home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Source Code / C / Applications / Tcl-Tk 8.0 / Pre-installed version / tk8.0 / xlib / X11 / Xlib.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-08-15  |  100.1 KB  |  4,312 lines  |  [TEXT/CWIE]

  1. /* $XConsortium: Xlib.h,v 11.221 93/07/02 14:13:28 gildea Exp $ */
  2. /* 
  3.  * Copyright 1985, 1986, 1987, 1991 by the Massachusetts Institute of Technology
  4.  *
  5.  * Permission to use, copy, modify, and distribute this software and its
  6.  * documentation for any purpose and without fee is hereby granted, provided 
  7.  * that the above copyright notice appear in all copies and that both that 
  8.  * copyright notice and this permission notice appear in supporting 
  9.  * documentation, and that the name of M.I.T. not be used in advertising
  10.  * or publicity pertaining to distribution of the software without specific, 
  11.  * written prior permission. M.I.T. makes no representations about the 
  12.  * suitability of this software for any purpose.  It is provided "as is"
  13.  * without express or implied warranty.
  14.  *
  15.  * X Window System is a Trademark of MIT.
  16.  *
  17.  */
  18.  
  19.  
  20. /*
  21.  *    Xlib.h - Header definition and support file for the C subroutine
  22.  *    interface library (Xlib) to the X Window System Protocol (V11).
  23.  *    Structures and symbols starting with "_" are private to the library.
  24.  */
  25. #ifndef _XLIB_H_
  26. #define _XLIB_H_
  27.  
  28. #define XlibSpecificationRelease 5
  29.  
  30. #ifdef MAC_TCL
  31. #   include <X.h>
  32. #   define Cursor XCursor
  33. #   define Region XRegion
  34. #else
  35. #   include <X11/X.h>
  36. #endif
  37.  
  38. /* applications should not depend on these two headers being included! */
  39. #ifdef MAC_TCL
  40. #include <Xfuncproto.h>
  41. #else
  42. #include <X11/Xfuncproto.h>
  43. #endif
  44.  
  45. #ifndef X_WCHAR
  46. #ifdef X_NOT_STDC_ENV
  47. #define X_WCHAR
  48. #endif
  49. #endif
  50.  
  51. #ifndef X_WCHAR
  52. #include <stddef.h>
  53. #else
  54. /* replace this with #include or typedef appropriate for your system */
  55. typedef unsigned long wchar_t;
  56. #endif
  57.  
  58. typedef char *XPointer;
  59.  
  60. #define Bool int
  61. #define Status int
  62. #define True 1
  63. #define False 0
  64.  
  65. #define QueuedAlready 0
  66. #define QueuedAfterReading 1
  67. #define QueuedAfterFlush 2
  68.  
  69. #define ConnectionNumber(dpy)     ((dpy)->fd)
  70. #define RootWindow(dpy, scr)     (((dpy)->screens[(scr)]).root)
  71. #define DefaultScreen(dpy)     ((dpy)->default_screen)
  72. #define DefaultRootWindow(dpy)     (((dpy)->screens[(dpy)->default_screen]).root)
  73. #define DefaultVisual(dpy, scr) (((dpy)->screens[(scr)]).root_visual)
  74. #define DefaultGC(dpy, scr)     (((dpy)->screens[(scr)]).default_gc)
  75. #define BlackPixel(dpy, scr)     (((dpy)->screens[(scr)]).black_pixel)
  76. #define WhitePixel(dpy, scr)     (((dpy)->screens[(scr)]).white_pixel)
  77. #define AllPlanes         ((unsigned long)~0L)
  78. #define QLength(dpy)         ((dpy)->qlen)
  79. #define DisplayWidth(dpy, scr)     (((dpy)->screens[(scr)]).width)
  80. #define DisplayHeight(dpy, scr) (((dpy)->screens[(scr)]).height)
  81. #define DisplayWidthMM(dpy, scr)(((dpy)->screens[(scr)]).mwidth)
  82. #define DisplayHeightMM(dpy, scr)(((dpy)->screens[(scr)]).mheight)
  83. #define DisplayPlanes(dpy, scr) (((dpy)->screens[(scr)]).root_depth)
  84. #define DisplayCells(dpy, scr)     (DefaultVisual((dpy), (scr))->map_entries)
  85. #define ScreenCount(dpy)     ((dpy)->nscreens)
  86. #define ServerVendor(dpy)     ((dpy)->vendor)
  87. #define ProtocolVersion(dpy)     ((dpy)->proto_major_version)
  88. #define ProtocolRevision(dpy)     ((dpy)->proto_minor_version)
  89. #define VendorRelease(dpy)     ((dpy)->release)
  90. #define DisplayString(dpy)     ((dpy)->display_name)
  91. #define DefaultDepth(dpy, scr)     (((dpy)->screens[(scr)]).root_depth)
  92. #define DefaultColormap(dpy, scr)(((dpy)->screens[(scr)]).cmap)
  93. #define BitmapUnit(dpy)     ((dpy)->bitmap_unit)
  94. #define BitmapBitOrder(dpy)     ((dpy)->bitmap_bit_order)
  95. #define BitmapPad(dpy)         ((dpy)->bitmap_pad)
  96. #define ImageByteOrder(dpy)     ((dpy)->byte_order)
  97. #define NextRequest(dpy)    ((dpy)->request + 1)
  98. #define LastKnownRequestProcessed(dpy)    ((dpy)->request)
  99.  
  100. /* macros for screen oriented applications (toolkit) */
  101. #define ScreenOfDisplay(dpy, scr)(&((dpy)->screens[(scr)]))
  102. #define DefaultScreenOfDisplay(dpy) (&((dpy)->screens[(dpy)->default_screen]))
  103. #define DisplayOfScreen(s)    ((s)->display)
  104. #define RootWindowOfScreen(s)    ((s)->root)
  105. #define BlackPixelOfScreen(s)    ((s)->black_pixel)
  106. #define WhitePixelOfScreen(s)    ((s)->white_pixel)
  107. #define DefaultColormapOfScreen(s)((s)->cmap)
  108. #define DefaultDepthOfScreen(s)    ((s)->root_depth)
  109. #define DefaultGCOfScreen(s)    ((s)->default_gc)
  110. #define DefaultVisualOfScreen(s)((s)->root_visual)
  111. #define WidthOfScreen(s)    ((s)->width)
  112. #define HeightOfScreen(s)    ((s)->height)
  113. #define WidthMMOfScreen(s)    ((s)->mwidth)
  114. #define HeightMMOfScreen(s)    ((s)->mheight)
  115. #define PlanesOfScreen(s)    ((s)->root_depth)
  116. #define CellsOfScreen(s)    (DefaultVisualOfScreen((s))->map_entries)
  117. #define MinCmapsOfScreen(s)    ((s)->min_maps)
  118. #define MaxCmapsOfScreen(s)    ((s)->max_maps)
  119. #define DoesSaveUnders(s)    ((s)->save_unders)
  120. #define DoesBackingStore(s)    ((s)->backing_store)
  121. #define EventMaskOfScreen(s)    ((s)->root_input_mask)
  122.  
  123. /*
  124.  * Extensions need a way to hang private data on some structures.
  125.  */
  126. typedef struct _XExtData {
  127.     int number;        /* number returned by XRegisterExtension */
  128.     struct _XExtData *next;    /* next item on list of data for structure */
  129.     int (*free_private)();    /* called to free private storage */
  130.     XPointer private_data;    /* data private to this extension. */
  131. } XExtData;
  132.  
  133. /*
  134.  * This file contains structures used by the extension mechanism.
  135.  */
  136. typedef struct {        /* public to extension, cannot be changed */
  137.     int extension;        /* extension number */
  138.     int major_opcode;    /* major op-code assigned by server */
  139.     int first_event;    /* first event number for the extension */
  140.     int first_error;    /* first error number for the extension */
  141. } XExtCodes;
  142.  
  143. /*
  144.  * Data structure for retrieving info about pixmap formats.
  145.  */
  146.  
  147. typedef struct {
  148.     int depth;
  149.     int bits_per_pixel;
  150.     int scanline_pad;
  151. } XPixmapFormatValues;
  152.  
  153.  
  154. /*
  155.  * Data structure for setting graphics context.
  156.  */
  157. typedef struct {
  158.     int function;        /* logical operation */
  159.     unsigned long plane_mask;/* plane mask */
  160.     unsigned long foreground;/* foreground pixel */
  161.     unsigned long background;/* background pixel */
  162.     int line_width;        /* line width */
  163.     int line_style;         /* LineSolid, LineOnOffDash, LineDoubleDash */
  164.     int cap_style;          /* CapNotLast, CapButt, 
  165.                    CapRound, CapProjecting */
  166.     int join_style;         /* JoinMiter, JoinRound, JoinBevel */
  167.     int fill_style;         /* FillSolid, FillTiled, 
  168.                    FillStippled, FillOpaeueStippled */
  169.     int fill_rule;          /* EvenOddRule, WindingRule */
  170.     int arc_mode;        /* ArcChord, ArcPieSlice */
  171.     Pixmap tile;        /* tile pixmap for tiling operations */
  172.     Pixmap stipple;        /* stipple 1 plane pixmap for stipping */
  173.     int ts_x_origin;    /* offset for tile or stipple operations */
  174.     int ts_y_origin;
  175.         Font font;            /* default text font for text operations */
  176.     int subwindow_mode;     /* ClipByChildren, IncludeInferiors */
  177.     Bool graphics_exposures;/* boolean, should exposures be generated */
  178.     int clip_x_origin;    /* origin for clipping */
  179.     int clip_y_origin;
  180.     Pixmap clip_mask;    /* bitmap clipping; other calls for rects */
  181.     int dash_offset;    /* patterned/dashed line information */
  182.     char dashes;
  183. } XGCValues;
  184.  
  185. /*
  186.  * Graphics context.  The contents of this structure are implementation
  187.  * dependent.  A GC should be treated as opaque by application code.
  188.  */
  189.  
  190. typedef XGCValues *GC;
  191.  
  192. /*
  193.  * Visual structure; contains information about colormapping possible.
  194.  */
  195. typedef struct {
  196.     XExtData *ext_data;    /* hook for extension to hang data */
  197.     VisualID visualid;    /* visual id of this visual */
  198. #if defined(__cplusplus) || defined(c_plusplus)
  199.     int c_class;        /* C++ class of screen (monochrome, etc.) */
  200. #else
  201.     int class;        /* class of screen (monochrome, etc.) */
  202. #endif
  203.     unsigned long red_mask, green_mask, blue_mask;    /* mask values */
  204.     int bits_per_rgb;    /* log base 2 of distinct color values */
  205.     int map_entries;    /* color map entries */
  206. } Visual;
  207.  
  208. /*
  209.  * Depth structure; contains information for each possible depth.
  210.  */    
  211. typedef struct {
  212.     int depth;        /* this depth (Z) of the depth */
  213.     int nvisuals;        /* number of Visual types at this depth */
  214.     Visual *visuals;    /* list of visuals possible at this depth */
  215. } Depth;
  216.  
  217. /*
  218.  * Information about the screen.  The contents of this structure are
  219.  * implementation dependent.  A Screen should be treated as opaque
  220.  * by application code.
  221.  */
  222. typedef struct {
  223.     XExtData *ext_data;    /* hook for extension to hang data */
  224.     struct _XDisplay *display;/* back pointer to display structure */
  225.     Window root;        /* Root window id. */
  226.     int width, height;    /* width and height of screen */
  227.     int mwidth, mheight;    /* width and height of  in millimeters */
  228.     int ndepths;        /* number of depths possible */
  229.     Depth *depths;        /* list of allowable depths on the screen */
  230.     int root_depth;        /* bits per pixel */
  231.     Visual *root_visual;    /* root visual */
  232.     GC default_gc;        /* GC for the root root visual */
  233.     Colormap cmap;        /* default color map */
  234.     unsigned long white_pixel;
  235.     unsigned long black_pixel;    /* White and Black pixel values */
  236.     int max_maps, min_maps;    /* max and min color maps */
  237.     int backing_store;    /* Never, WhenMapped, Always */
  238.     Bool save_unders;    
  239.     long root_input_mask;    /* initial root input mask */
  240. } Screen;
  241.  
  242. /*
  243.  * Format structure; describes ZFormat data the screen will understand.
  244.  */
  245. typedef struct {
  246.     XExtData *ext_data;    /* hook for extension to hang data */
  247.     int depth;        /* depth of this image format */
  248.     int bits_per_pixel;    /* bits/pixel at this depth */
  249.     int scanline_pad;    /* scanline must padded to this multiple */
  250. } ScreenFormat;
  251.  
  252. /*
  253.  * Data structure for setting window attributes.
  254.  */
  255. typedef struct {
  256.     Pixmap background_pixmap;    /* background or None or ParentRelative */
  257.     unsigned long background_pixel;    /* background pixel */
  258.     Pixmap border_pixmap;    /* border of the window */
  259.     unsigned long border_pixel;    /* border pixel value */
  260.     int bit_gravity;        /* one of bit gravity values */
  261.     int win_gravity;        /* one of the window gravity values */
  262.     int backing_store;        /* NotUseful, WhenMapped, Always */
  263.     unsigned long backing_planes;/* planes to be preseved if possible */
  264.     unsigned long backing_pixel;/* value to use in restoring planes */
  265.     Bool save_under;        /* should bits under be saved? (popups) */
  266.     long event_mask;        /* set of events that should be saved */
  267.     long do_not_propagate_mask;    /* set of events that should not propagate */
  268.     Bool override_redirect;    /* boolean value for override-redirect */
  269.     Colormap colormap;        /* color map to be associated with window */
  270.     Cursor cursor;        /* cursor to be displayed (or None) */
  271. } XSetWindowAttributes;
  272.  
  273. typedef struct {
  274.     int x, y;            /* location of window */
  275.     int width, height;        /* width and height of window */
  276.     int border_width;        /* border width of window */
  277.     int depth;              /* depth of window */
  278.     Visual *visual;        /* the associated visual structure */
  279.     Window root;            /* root of screen containing window */
  280. #if defined(__cplusplus) || defined(c_plusplus)
  281.     int c_class;        /* C++ InputOutput, InputOnly*/
  282. #else
  283.     int class;            /* InputOutput, InputOnly*/
  284. #endif
  285.     int bit_gravity;        /* one of bit gravity values */
  286.     int win_gravity;        /* one of the window gravity values */
  287.     int backing_store;        /* NotUseful, WhenMapped, Always */
  288.     unsigned long backing_planes;/* planes to be preserved if possible */
  289.     unsigned long backing_pixel;/* value to be used when restoring planes */
  290.     Bool save_under;        /* boolean, should bits under be saved? */
  291.     Colormap colormap;        /* color map to be associated with window */
  292.     Bool map_installed;        /* boolean, is color map currently installed*/
  293.     int map_state;        /* IsUnmapped, IsUnviewable, IsViewable */
  294.     long all_event_masks;    /* set of events all people have interest in*/
  295.     long your_event_mask;    /* my event mask */
  296.     long do_not_propagate_mask; /* set of events that should not propagate */
  297.     Bool override_redirect;    /* boolean value for override-redirect */
  298.     Screen *screen;        /* back pointer to correct screen */
  299. } XWindowAttributes;
  300.  
  301. /*
  302.  * Data structure for host setting; getting routines.
  303.  *
  304.  */
  305.  
  306. typedef struct {
  307.     int family;        /* for example FamilyInternet */
  308.     int length;        /* length of address, in bytes */
  309.     char *address;        /* pointer to where to find the bytes */
  310. } XHostAddress;
  311.  
  312. /*
  313.  * Data structure for "image" data, used by image manipulation routines.
  314.  */
  315. typedef struct _XImage {
  316.     int width, height;        /* size of image */
  317.     int xoffset;        /* number of pixels offset in X direction */
  318.     int format;            /* XYBitmap, XYPixmap, ZPixmap */
  319.     char *data;            /* pointer to image data */
  320.     int byte_order;        /* data byte order, LSBFirst, MSBFirst */
  321.     int bitmap_unit;        /* quant. of scanline 8, 16, 32 */
  322.     int bitmap_bit_order;    /* LSBFirst, MSBFirst */
  323.     int bitmap_pad;        /* 8, 16, 32 either XY or ZPixmap */
  324.     int depth;            /* depth of image */
  325.     int bytes_per_line;        /* accelarator to next line */
  326.     int bits_per_pixel;        /* bits per pixel (ZPixmap) */
  327.     unsigned long red_mask;    /* bits in z arrangment */
  328.     unsigned long green_mask;
  329.     unsigned long blue_mask;
  330.     XPointer obdata;        /* hook for the object routines to hang on */
  331.     struct funcs {        /* image manipulation routines */
  332.     struct _XImage *(*create_image)();
  333. #if NeedFunctionPrototypes
  334.     int (*destroy_image)        (struct _XImage *);
  335.     unsigned long (*get_pixel)  (struct _XImage *, int, int);
  336.     int (*put_pixel)            (struct _XImage *, int, int, unsigned long);
  337.     struct _XImage *(*sub_image)(struct _XImage *, int, int, unsigned int, unsigned int);
  338.     int (*add_pixel)            (struct _XImage *, long);
  339. #else
  340.     int (*destroy_image)();
  341.     unsigned long (*get_pixel)();
  342.     int (*put_pixel)();
  343.     struct _XImage *(*sub_image)();
  344.     int (*add_pixel)();
  345. #endif
  346.     } f;
  347. } XImage;
  348.  
  349. /* 
  350.  * Data structure for XReconfigureWindow
  351.  */
  352. typedef struct {
  353.     int x, y;
  354.     int width, height;
  355.     int border_width;
  356.     Window sibling;
  357.     int stack_mode;
  358. } XWindowChanges;
  359.  
  360. /*
  361.  * Data structure used by color operations
  362.  */
  363. typedef struct {
  364.     unsigned long pixel;
  365.     unsigned short red, green, blue;
  366.     char flags;  /* do_red, do_green, do_blue */
  367.     char pad;
  368. } XColor;
  369.  
  370. /* 
  371.  * Data structures for graphics operations.  On most machines, these are
  372.  * congruent with the wire protocol structures, so reformatting the data
  373.  * can be avoided on these architectures.
  374.  */
  375. typedef struct {
  376.     short x1, y1, x2, y2;
  377. } XSegment;
  378.  
  379. typedef struct {
  380.     short x, y;
  381. } XPoint;
  382.     
  383. typedef struct {
  384.     short x, y;
  385.     unsigned short width, height;
  386. } XRectangle;
  387.     
  388. typedef struct {
  389.     short x, y;
  390.     unsigned short width, height;
  391.     short angle1, angle2;
  392. } XArc;
  393.  
  394.  
  395. /* Data structure for XChangeKeyboardControl */
  396.  
  397. typedef struct {
  398.         int key_click_percent;
  399.         int bell_percent;
  400.         int bell_pitch;
  401.         int bell_duration;
  402.         int led;
  403.         int led_mode;
  404.         int key;
  405.         int auto_repeat_mode;   /* On, Off, Default */
  406. } XKeyboardControl;
  407.  
  408. /* Data structure for XGetKeyboardControl */
  409.  
  410. typedef struct {
  411.         int key_click_percent;
  412.     int bell_percent;
  413.     unsigned int bell_pitch, bell_duration;
  414.     unsigned long led_mask;
  415.     int global_auto_repeat;
  416.     char auto_repeats[32];
  417. } XKeyboardState;
  418.  
  419. /* Data structure for XGetMotionEvents.  */
  420.  
  421. typedef struct {
  422.         Time time;
  423.     short x, y;
  424. } XTimeCoord;
  425.  
  426. /* Data structure for X{Set,Get}ModifierMapping */
  427.  
  428. typedef struct {
  429.      int max_keypermod;    /* The server's max # of keys per modifier */
  430.      KeyCode *modifiermap;    /* An 8 by max_keypermod array of modifiers */
  431. } XModifierKeymap;
  432.  
  433.  
  434. /*
  435.  * Display datatype maintaining display specific data.
  436.  * The contents of this structure are implementation dependent.
  437.  * A Display should be treated as opaque by application code.
  438.  */
  439. typedef struct _XDisplay {
  440.     XExtData *ext_data;    /* hook for extension to hang data */
  441.     struct _XFreeFuncs *free_funcs; /* internal free functions */
  442.     int fd;            /* Network socket. */
  443.     int conn_checker;         /* ugly thing used by _XEventsQueued */
  444.     int proto_major_version;/* maj. version of server's X protocol */
  445.     int proto_minor_version;/* minor version of servers X protocol */
  446.     char *vendor;        /* vendor of the server hardware */
  447.         XID resource_base;    /* resource ID base */
  448.     XID resource_mask;    /* resource ID mask bits */
  449.     XID resource_id;    /* allocator current ID */
  450.     int resource_shift;    /* allocator shift to correct bits */
  451.     XID (*resource_alloc)(); /* allocator function */
  452.     int byte_order;        /* screen byte order, LSBFirst, MSBFirst */
  453.     int bitmap_unit;    /* padding and data requirements */
  454.     int bitmap_pad;        /* padding requirements on bitmaps */
  455.     int bitmap_bit_order;    /* LeastSignificant or MostSignificant */
  456.     int nformats;        /* number of pixmap formats in list */
  457.     ScreenFormat *pixmap_format;    /* pixmap format list */
  458.     int vnumber;        /* Xlib's X protocol version number. */
  459.     int release;        /* release of the server */
  460.     struct _XSQEvent *head, *tail;    /* Input event queue. */
  461.     int qlen;        /* Length of input event queue */
  462.     unsigned long request;    /* sequence number of last request. */
  463.     char *last_req;        /* beginning of last request, or dummy */
  464.     char *buffer;        /* Output buffer starting address. */
  465.     char *bufptr;        /* Output buffer index pointer. */
  466.     char *bufmax;        /* Output buffer maximum+1 address. */
  467.     unsigned max_request_size; /* maximum number 32 bit words in request*/
  468.     struct _XrmHashBucketRec *db;
  469.     int (*synchandler)();    /* Synchronization handler */
  470.     char *display_name;    /* "host:display" string used on this connect*/
  471.     int default_screen;    /* default screen for operations */
  472.     int nscreens;        /* number of screens on this server*/
  473.     Screen *screens;    /* pointer to list of screens */
  474.     unsigned long motion_buffer;    /* size of motion buffer */
  475.     unsigned long flags;    /* internal connection flags */
  476.     int min_keycode;    /* minimum defined keycode */
  477.     int max_keycode;    /* maximum defined keycode */
  478.     KeySym *keysyms;    /* This server's keysyms */
  479.     XModifierKeymap *modifiermap;    /* This server's modifier keymap */
  480.     int keysyms_per_keycode;/* number of rows */
  481.     char *xdefaults;    /* contents of defaults from server */
  482.     char *scratch_buffer;    /* place to hang scratch buffer */
  483.     unsigned long scratch_length;    /* length of scratch buffer */
  484.     int ext_number;        /* extension number on this display */
  485.     struct _XExten *ext_procs; /* extensions initialized on this display */
  486.     /*
  487.      * the following can be fixed size, as the protocol defines how
  488.      * much address space is available. 
  489.      * While this could be done using the extension vector, there
  490.      * may be MANY events processed, so a search through the extension
  491.      * list to find the right procedure for each event might be
  492.      * expensive if many extensions are being used.
  493.      */
  494.     Bool (*event_vec[128])();  /* vector for wire to event */
  495.     Status (*wire_vec[128])(); /* vector for event to wire */
  496.     KeySym lock_meaning;       /* for XLookupString */
  497.     struct _XLockInfo *lock;   /* multi-thread state, display lock */
  498.     struct _XInternalAsync *async_handlers; /* for internal async */
  499.     unsigned long bigreq_size; /* max size of big requests */
  500.     struct _XLockPtrs *lock_fns; /* pointers to threads functions */
  501.     /* things above this line should not move, for binary compatibility */
  502.     struct _XKeytrans *key_bindings; /* for XLookupString */
  503.     Font cursor_font;       /* for XCreateFontCursor */
  504.     struct _XDisplayAtoms *atoms; /* for XInternAtom */
  505.     unsigned int mode_switch;  /* keyboard group modifiers */
  506.     struct _XContextDB *context_db; /* context database */
  507.     Bool (**error_vec)();      /* vector for wire to error */
  508.     /*
  509.      * Xcms information
  510.      */
  511.     struct {
  512.        XPointer defaultCCCs;  /* pointer to an array of default XcmsCCC */
  513.        XPointer clientCmaps;  /* pointer to linked list of XcmsCmapRec */
  514.        XPointer perVisualIntensityMaps;
  515.                   /* linked list of XcmsIntensityMap */
  516.     } cms;
  517.     struct _XIMFilter *im_filters;
  518.     struct _XSQEvent *qfree; /* unallocated event queue elements */
  519.     unsigned long next_event_serial_num; /* inserted into next queue elt */
  520.     int (*savedsynchandler)(); /* user synchandler when Xlib usurps */
  521. } Display;
  522.  
  523. #if NeedFunctionPrototypes    /* prototypes require event type definitions */
  524. #undef _XEVENT_
  525. #endif
  526. #ifndef _XEVENT_
  527.  
  528. #define XMaxTransChars 4
  529.  
  530. /*
  531.  * Definitions of specific events.
  532.  */
  533. typedef struct {
  534.     int type;        /* of event */
  535.     unsigned long serial;    /* # of last request processed by server */
  536.     Bool send_event;    /* true if this came from a SendEvent request */
  537.     Display *display;    /* Display the event was read from */
  538.     Window window;            /* "event" window it is reported relative to */
  539.     Window root;            /* root window that the event occured on */
  540.     Window subwindow;    /* child window */
  541.     Time time;        /* milliseconds */
  542.     int x, y;        /* pointer x, y coordinates in event window */
  543.     int x_root, y_root;    /* coordinates relative to root */
  544.     unsigned int state;    /* key or button mask */
  545.     unsigned int keycode;    /* detail */
  546.     Bool same_screen;    /* same screen flag */
  547.         char trans_chars[XMaxTransChars];
  548.                 /* translated characters */
  549.     int nchars;
  550. } XKeyEvent;
  551. typedef XKeyEvent XKeyPressedEvent;
  552. typedef XKeyEvent XKeyReleasedEvent;
  553.  
  554. typedef struct {
  555.     int type;        /* of event */
  556.     unsigned long serial;    /* # of last request processed by server */
  557.     Bool send_event;    /* true if this came from a SendEvent request */
  558.     Display *display;    /* Display the event was read from */
  559.     Window window;            /* "event" window it is reported relative to */
  560.     Window root;            /* root window that the event occured on */
  561.     Window subwindow;    /* child window */
  562.     Time time;        /* milliseconds */
  563.     int x, y;        /* pointer x, y coordinates in event window */
  564.     int x_root, y_root;    /* coordinates relative to root */
  565.     unsigned int state;    /* key or button mask */
  566.     unsigned int button;    /* detail */
  567.     Bool same_screen;    /* same screen flag */
  568. } XButtonEvent;
  569. typedef XButtonEvent XButtonPressedEvent;
  570. typedef XButtonEvent XButtonReleasedEvent;
  571.  
  572. typedef struct {
  573.     int type;        /* of event */
  574.     unsigned long serial;    /* # of last request processed by server */
  575.     Bool send_event;    /* true if this came from a SendEvent request */
  576.     Display *display;    /* Display the event was read from */
  577.     Window window;            /* "event" window reported relative to */
  578.     Window root;            /* root window that the event occured on */
  579.     Window subwindow;    /* child window */
  580.     Time time;        /* milliseconds */
  581.     int x, y;        /* pointer x, y coordinates in event window */
  582.     int x_root, y_root;    /* coordinates relative to root */
  583.     unsigned int state;    /* key or button mask */
  584.     char is_hint;        /* detail */
  585.     Bool same_screen;    /* same screen flag */
  586. } XMotionEvent;
  587. typedef XMotionEvent XPointerMovedEvent;
  588.  
  589. typedef struct {
  590.     int type;        /* of event */
  591.     unsigned long serial;    /* # of last request processed by server */
  592.     Bool send_event;    /* true if this came from a SendEvent request */
  593.     Display *display;    /* Display the event was read from */
  594.     Window window;            /* "event" window reported relative to */
  595.     Window root;            /* root window that the event occured on */
  596.     Window subwindow;    /* child window */
  597.     Time time;        /* milliseconds */
  598.     int x, y;        /* pointer x, y coordinates in event window */
  599.     int x_root, y_root;    /* coordinates relative to root */
  600.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  601.     int detail;
  602.     /*
  603.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  604.      * NotifyNonlinear,NotifyNonlinearVirtual
  605.      */
  606.     Bool same_screen;    /* same screen flag */
  607.     Bool focus;        /* boolean focus */
  608.     unsigned int state;    /* key or button mask */
  609. } XCrossingEvent;
  610. typedef XCrossingEvent XEnterWindowEvent;
  611. typedef XCrossingEvent XLeaveWindowEvent;
  612.  
  613. typedef struct {
  614.     int type;        /* FocusIn or FocusOut */
  615.     unsigned long serial;    /* # of last request processed by server */
  616.     Bool send_event;    /* true if this came from a SendEvent request */
  617.     Display *display;    /* Display the event was read from */
  618.     Window window;        /* window of event */
  619.     int mode;        /* NotifyNormal, NotifyGrab, NotifyUngrab */
  620.     int detail;
  621.     /*
  622.      * NotifyAncestor, NotifyVirtual, NotifyInferior, 
  623.      * NotifyNonlinear,NotifyNonlinearVirtual, NotifyPointer,
  624.      * NotifyPointerRoot, NotifyDetailNone 
  625.      */
  626. } XFocusChangeEvent;
  627. typedef XFocusChangeEvent XFocusInEvent;
  628. typedef XFocusChangeEvent XFocusOutEvent;
  629.  
  630. /* generated on EnterWindow and FocusIn  when KeyMapState selected */
  631. typedef struct {
  632.     int type;
  633.     unsigned long serial;    /* # of last request processed by server */
  634.     Bool send_event;    /* true if this came from a SendEvent request */
  635.     Display *display;    /* Display the event was read from */
  636.     Window window;
  637.     char key_vector[32];
  638. } XKeymapEvent;    
  639.  
  640. typedef struct {
  641.     int type;
  642.     unsigned long serial;    /* # of last request processed by server */
  643.     Bool send_event;    /* true if this came from a SendEvent request */
  644.     Display *display;    /* Display the event was read from */
  645.     Window window;
  646.     int x, y;
  647.     int width, height;
  648.     int count;        /* if non-zero, at least this many more */
  649. } XExposeEvent;
  650.  
  651. typedef struct {
  652.     int type;
  653.     unsigned long serial;    /* # of last request processed by server */
  654.     Bool send_event;    /* true if this came from a SendEvent request */
  655.     Display *display;    /* Display the event was read from */
  656.     Drawable drawable;
  657.     int x, y;
  658.     int width, height;
  659.     int count;        /* if non-zero, at least this many more */
  660.     int major_code;        /* core is CopyArea or CopyPlane */
  661.     int minor_code;        /* not defined in the core */
  662. } XGraphicsExposeEvent;
  663.  
  664. typedef struct {
  665.     int type;
  666.     unsigned long serial;    /* # of last request processed by server */
  667.     Bool send_event;    /* true if this came from a SendEvent request */
  668.     Display *display;    /* Display the event was read from */
  669.     Drawable drawable;
  670.     int major_code;        /* core is CopyArea or CopyPlane */
  671.     int minor_code;        /* not defined in the core */
  672. } XNoExposeEvent;
  673.  
  674. typedef struct {
  675.     int type;
  676.     unsigned long serial;    /* # of last request processed by server */
  677.     Bool send_event;    /* true if this came from a SendEvent request */
  678.     Display *display;    /* Display the event was read from */
  679.     Window window;
  680.     int state;        /* Visibility state */
  681. } XVisibilityEvent;
  682.  
  683. typedef struct {
  684.     int type;
  685.     unsigned long serial;    /* # of last request processed by server */
  686.     Bool send_event;    /* true if this came from a SendEvent request */
  687.     Display *display;    /* Display the event was read from */
  688.     Window parent;        /* parent of the window */
  689.     Window window;        /* window id of window created */
  690.     int x, y;        /* window location */
  691.     int width, height;    /* size of window */
  692.     int border_width;    /* border width */
  693.     Bool override_redirect;    /* creation should be overridden */
  694. } XCreateWindowEvent;
  695.  
  696. typedef struct {
  697.     int type;
  698.     unsigned long serial;    /* # of last request processed by server */
  699.     Bool send_event;    /* true if this came from a SendEvent request */
  700.     Display *display;    /* Display the event was read from */
  701.     Window event;
  702.     Window window;
  703. } XDestroyWindowEvent;
  704.  
  705. typedef struct {
  706.     int type;
  707.     unsigned long serial;    /* # of last request processed by server */
  708.     Bool send_event;    /* true if this came from a SendEvent request */
  709.     Display *display;    /* Display the event was read from */
  710.     Window event;
  711.     Window window;
  712.     Bool from_configure;
  713. } XUnmapEvent;
  714.  
  715. typedef struct {
  716.     int type;
  717.     unsigned long serial;    /* # of last request processed by server */
  718.     Bool send_event;    /* true if this came from a SendEvent request */
  719.     Display *display;    /* Display the event was read from */
  720.     Window event;
  721.     Window window;
  722.     Bool override_redirect;    /* boolean, is override set... */
  723. } XMapEvent;
  724.  
  725. typedef struct {
  726.     int type;
  727.     unsigned long serial;    /* # of last request processed by server */
  728.     Bool send_event;    /* true if this came from a SendEvent request */
  729.     Display *display;    /* Display the event was read from */
  730.     Window parent;
  731.     Window window;
  732. } XMapRequestEvent;
  733.  
  734. typedef struct {
  735.     int type;
  736.     unsigned long serial;    /* # of last request processed by server */
  737.     Bool send_event;    /* true if this came from a SendEvent request */
  738.     Display *display;    /* Display the event was read from */
  739.     Window event;
  740.     Window window;
  741.     Window parent;
  742.     int x, y;
  743.     Bool override_redirect;
  744. } XReparentEvent;
  745.  
  746. typedef struct {
  747.     int type;
  748.     unsigned long serial;    /* # of last request processed by server */
  749.     Bool send_event;    /* true if this came from a SendEvent request */
  750.     Display *display;    /* Display the event was read from */
  751.     Window event;
  752.     Window window;
  753.     int x, y;
  754.     int width, height;
  755.     int border_width;
  756.     Window above;
  757.     Bool override_redirect;
  758. } XConfigureEvent;
  759.  
  760. typedef struct {
  761.     int type;
  762.     unsigned long serial;    /* # of last request processed by server */
  763.     Bool send_event;    /* true if this came from a SendEvent request */
  764.     Display *display;    /* Display the event was read from */
  765.     Window event;
  766.     Window window;
  767.     int x, y;
  768. } XGravityEvent;
  769.  
  770. typedef struct {
  771.     int type;
  772.     unsigned long serial;    /* # of last request processed by server */
  773.     Bool send_event;    /* true if this came from a SendEvent request */
  774.     Display *display;    /* Display the event was read from */
  775.     Window window;
  776.     int width, height;
  777. } XResizeRequestEvent;
  778.  
  779. typedef struct {
  780.     int type;
  781.     unsigned long serial;    /* # of last request processed by server */
  782.     Bool send_event;    /* true if this came from a SendEvent request */
  783.     Display *display;    /* Display the event was read from */
  784.     Window parent;
  785.     Window window;
  786.     int x, y;
  787.     int width, height;
  788.     int border_width;
  789.     Window above;
  790.     int detail;        /* Above, Below, TopIf, BottomIf, Opposite */
  791.     unsigned long value_mask;
  792. } XConfigureRequestEvent;
  793.  
  794. typedef struct {
  795.     int type;
  796.     unsigned long serial;    /* # of last request processed by server */
  797.     Bool send_event;    /* true if this came from a SendEvent request */
  798.     Display *display;    /* Display the event was read from */
  799.     Window event;
  800.     Window window;
  801.     int place;        /* PlaceOnTop, PlaceOnBottom */
  802. } XCirculateEvent;
  803.  
  804. typedef struct {
  805.     int type;
  806.     unsigned long serial;    /* # of last request processed by server */
  807.     Bool send_event;    /* true if this came from a SendEvent request */
  808.     Display *display;    /* Display the event was read from */
  809.     Window parent;
  810.     Window window;
  811.     int place;        /* PlaceOnTop, PlaceOnBottom */
  812. } XCirculateRequestEvent;
  813.  
  814. typedef struct {
  815.     int type;
  816.     unsigned long serial;    /* # of last request processed by server */
  817.     Bool send_event;    /* true if this came from a SendEvent request */
  818.     Display *display;    /* Display the event was read from */
  819.     Window window;
  820.     Atom atom;
  821.     Time time;
  822.     int state;        /* NewValue, Deleted */
  823. } XPropertyEvent;
  824.  
  825. typedef struct {
  826.     int type;
  827.     unsigned long serial;    /* # of last request processed by server */
  828.     Bool send_event;    /* true if this came from a SendEvent request */
  829.     Display *display;    /* Display the event was read from */
  830.     Window window;
  831.     Atom selection;
  832.     Time time;
  833. } XSelectionClearEvent;
  834.  
  835. typedef struct {
  836.     int type;
  837.     unsigned long serial;    /* # of last request processed by server */
  838.     Bool send_event;    /* true if this came from a SendEvent request */
  839.     Display *display;    /* Display the event was read from */
  840.     Window owner;
  841.     Window requestor;
  842.     Atom selection;
  843.     Atom target;
  844.     Atom property;
  845.     Time time;
  846. } XSelectionRequestEvent;
  847.  
  848. typedef struct {
  849.     int type;
  850.     unsigned long serial;    /* # of last request processed by server */
  851.     Bool send_event;    /* true if this came from a SendEvent request */
  852.     Display *display;    /* Display the event was read from */
  853.     Window requestor;
  854.     Atom selection;
  855.     Atom target;
  856.     Atom property;        /* ATOM or None */
  857.     Time time;
  858. } XSelectionEvent;
  859.  
  860. typedef struct {
  861.     int type;
  862.     unsigned long serial;    /* # of last request processed by server */
  863.     Bool send_event;    /* true if this came from a SendEvent request */
  864.     Display *display;    /* Display the event was read from */
  865.     Window window;
  866.     Colormap colormap;    /* COLORMAP or None */
  867. #if defined(__cplusplus) || defined(c_plusplus)
  868.     Bool c_new;        /* C++ */
  869. #else
  870.     Bool new;
  871. #endif
  872.     int state;        /* ColormapInstalled, ColormapUninstalled */
  873. } XColormapEvent;
  874.  
  875. typedef struct {
  876.     int type;
  877.     unsigned long serial;    /* # of last request processed by server */
  878.     Bool send_event;    /* true if this came from a SendEvent request */
  879.     Display *display;    /* Display the event was read from */
  880.     Window window;
  881.     Atom message_type;
  882.     int format;
  883.     union {
  884.         char b[20];
  885.         short s[10];
  886.         long l[5];
  887.         } data;
  888. } XClientMessageEvent;
  889.  
  890. typedef struct {
  891.     int type;
  892.     unsigned long serial;    /* # of last request processed by server */
  893.     Bool send_event;    /* true if this came from a SendEvent request */
  894.     Display *display;    /* Display the event was read from */
  895.     Window window;        /* unused */
  896.     int request;        /* one of MappingModifier, MappingKeyboard,
  897.                    MappingPointer */
  898.     int first_keycode;    /* first keycode */
  899.     int count;        /* defines range of change w. first_keycode*/
  900. } XMappingEvent;
  901.  
  902. typedef struct {
  903.     int type;
  904.     Display *display;    /* Display the event was read from */
  905.     XID resourceid;        /* resource id */
  906.     unsigned long serial;    /* serial number of failed request */
  907.     unsigned char error_code;    /* error code of failed request */
  908.     unsigned char request_code;    /* Major op-code of failed request */
  909.     unsigned char minor_code;    /* Minor op-code of failed request */
  910. } XErrorEvent;
  911.  
  912. typedef struct {
  913.     int type;
  914.     unsigned long serial;    /* # of last request processed by server */
  915.     Bool send_event;    /* true if this came from a SendEvent request */
  916.     Display *display;/* Display the event was read from */
  917.     Window window;    /* window on which event was requested in event mask */
  918. } XAnyEvent;
  919.  
  920. /*
  921.  * this union is defined so Xlib can always use the same sized
  922.  * event structure internally, to avoid memory fragmentation.
  923.  */
  924. typedef union _XEvent {
  925.         int type;        /* must not be changed; first element */
  926.     XAnyEvent xany;
  927.     XKeyEvent xkey;
  928.     XButtonEvent xbutton;
  929.     XMotionEvent xmotion;
  930.     XCrossingEvent xcrossing;
  931.     XFocusChangeEvent xfocus;
  932.     XExposeEvent xexpose;
  933.     XGraphicsExposeEvent xgraphicsexpose;
  934.     XNoExposeEvent xnoexpose;
  935.     XVisibilityEvent xvisibility;
  936.     XCreateWindowEvent xcreatewindow;
  937.     XDestroyWindowEvent xdestroywindow;
  938.     XUnmapEvent xunmap;
  939.     XMapEvent xmap;
  940.     XMapRequestEvent xmaprequest;
  941.     XReparentEvent xreparent;
  942.     XConfigureEvent xconfigure;
  943.     XGravityEvent xgravity;
  944.     XResizeRequestEvent xresizerequest;
  945.     XConfigureRequestEvent xconfigurerequest;
  946.     XCirculateEvent xcirculate;
  947.     XCirculateRequestEvent xcirculaterequest;
  948.     XPropertyEvent xproperty;
  949.     XSelectionClearEvent xselectionclear;
  950.     XSelectionRequestEvent xselectionrequest;
  951.     XSelectionEvent xselection;
  952.     XColormapEvent xcolormap;
  953.     XClientMessageEvent xclient;
  954.     XMappingEvent xmapping;
  955.     XErrorEvent xerror;
  956.     XKeymapEvent xkeymap;
  957.     long pad[24];
  958. } XEvent;
  959. #endif
  960.  
  961. #define XAllocID(dpy) ((*(dpy)->resource_alloc)((dpy)))
  962.  
  963. /*
  964.  * per character font metric information.
  965.  */
  966. typedef struct {
  967.     short    lbearing;    /* origin to left edge of raster */
  968.     short    rbearing;    /* origin to right edge of raster */
  969.     short    width;        /* advance to next char's origin */
  970.     short    ascent;        /* baseline to top edge of raster */
  971.     short    descent;    /* baseline to bottom edge of raster */
  972.     unsigned short attributes;    /* per char flags (not predefined) */
  973. } XCharStruct;
  974.  
  975. /*
  976.  * To allow arbitrary information with fonts, there are additional properties
  977.  * returned.
  978.  */
  979. typedef struct {
  980.     Atom name;
  981.     unsigned long card32;
  982. } XFontProp;
  983.  
  984. typedef struct {
  985.     XExtData    *ext_data;    /* hook for extension to hang data */
  986.     Font        fid;            /* Font id for this font */
  987.     unsigned    direction;    /* hint about direction the font is painted */
  988.     unsigned    min_char_or_byte2;/* first character */
  989.     unsigned    max_char_or_byte2;/* last character */
  990.     unsigned    min_byte1;    /* first row that exists */
  991.     unsigned    max_byte1;    /* last row that exists */
  992.     Bool    all_chars_exist;/* flag if all characters have non-zero size*/
  993.     unsigned    default_char;    /* char to print for undefined character */
  994.     int         n_properties;   /* how many properties there are */
  995.     XFontProp    *properties;    /* pointer to array of additional properties*/
  996.     XCharStruct    min_bounds;    /* minimum bounds over all existing char*/
  997.     XCharStruct    max_bounds;    /* maximum bounds over all existing char*/
  998.     XCharStruct    *per_char;    /* first_char to last_char information */
  999.     int        ascent;        /* log. extent above baseline for spacing */
  1000.     int        descent;    /* log. descent below baseline for spacing */
  1001. } XFontStruct;
  1002.  
  1003. /*
  1004.  * PolyText routines take these as arguments.
  1005.  */
  1006. typedef struct {
  1007.     char *chars;        /* pointer to string */
  1008.     int nchars;            /* number of characters */
  1009.     int delta;            /* delta between strings */
  1010.     Font font;            /* font to print it in, None don't change */
  1011. } XTextItem;
  1012.  
  1013. typedef struct {        /* normal 16 bit characters are two bytes */
  1014.     unsigned char byte1;
  1015.     unsigned char byte2;
  1016. } XChar2b;
  1017.  
  1018. typedef struct {
  1019.     XChar2b *chars;        /* two byte characters */
  1020.     int nchars;            /* number of characters */
  1021.     int delta;            /* delta between strings */
  1022.     Font font;            /* font to print it in, None don't change */
  1023. } XTextItem16;
  1024.  
  1025.  
  1026. typedef union { Display *display;
  1027.         GC gc;
  1028.         Visual *visual;
  1029.         Screen *screen;
  1030.         ScreenFormat *pixmap_format;
  1031.         XFontStruct *font; } XEDataObject;
  1032.  
  1033. typedef struct {
  1034.     XRectangle      max_ink_extent;
  1035.     XRectangle      max_logical_extent;
  1036. } XFontSetExtents;
  1037.  
  1038. typedef struct _XFontSet *XFontSet;
  1039.  
  1040. typedef struct {
  1041.     char           *chars;
  1042.     int             nchars;
  1043.     int             delta;
  1044.     XFontSet        font_set;
  1045. } XmbTextItem;
  1046.  
  1047. typedef struct {
  1048.     wchar_t        *chars;
  1049.     int             nchars;
  1050.     int             delta;
  1051.     XFontSet        font_set;
  1052. } XwcTextItem;
  1053.  
  1054. typedef void (*XIMProc)();
  1055.  
  1056. typedef struct _XIM *XIM;
  1057. typedef struct _XIC *XIC;
  1058.  
  1059. typedef unsigned long XIMStyle;
  1060.  
  1061. typedef struct {
  1062.     unsigned short count_styles;
  1063.     XIMStyle *supported_styles;
  1064. } XIMStyles;
  1065.  
  1066. #define XIMPreeditArea        0x0001L
  1067. #define XIMPreeditCallbacks    0x0002L
  1068. #define XIMPreeditPosition    0x0004L
  1069. #define XIMPreeditNothing    0x0008L
  1070. #define XIMPreeditNone        0x0010L
  1071. #define XIMStatusArea        0x0100L
  1072. #define XIMStatusCallbacks    0x0200L
  1073. #define XIMStatusNothing    0x0400L
  1074. #define XIMStatusNone        0x0800L
  1075.  
  1076. #define XNVaNestedList "XNVaNestedList"
  1077. #define XNClientWindow "clientWindow"
  1078. #define XNInputStyle "inputStyle"
  1079. #define XNFocusWindow "focusWindow"
  1080. #define XNResourceName "resourceName"
  1081. #define XNResourceClass "resourceClass"
  1082. #define XNGeometryCallback "geometryCallback"
  1083. #define XNFilterEvents "filterEvents"
  1084. #define XNPreeditStartCallback "preeditStartCallback"
  1085. #define XNPreeditDoneCallback "preeditDoneCallback"
  1086. #define XNPreeditDrawCallback "preeditDrawCallback"
  1087. #define XNPreeditCaretCallback "preeditCaretCallback"
  1088. #define XNPreeditAttributes "preeditAttributes"
  1089. #define XNStatusStartCallback "statusStartCallback"
  1090. #define XNStatusDoneCallback "statusDoneCallback"
  1091. #define XNStatusDrawCallback "statusDrawCallback"
  1092. #define XNStatusAttributes "statusAttributes"
  1093. #define XNArea "area"
  1094. #define XNAreaNeeded "areaNeeded"
  1095. #define XNSpotLocation "spotLocation"
  1096. #define XNColormap "colorMap"
  1097. #define XNStdColormap "stdColorMap"
  1098. #define XNForeground "foreground"
  1099. #define XNBackground "background"
  1100. #define XNBackgroundPixmap "backgroundPixmap"
  1101. #define XNFontSet "fontSet"
  1102. #define XNLineSpace "lineSpace"
  1103. #define XNCursor "cursor"
  1104.  
  1105. #define XBufferOverflow        -1
  1106. #define XLookupNone        1
  1107. #define XLookupChars        2
  1108. #define XLookupKeySym        3
  1109. #define XLookupBoth        4
  1110.  
  1111. #if NeedFunctionPrototypes
  1112. typedef void *XVaNestedList;
  1113. #else
  1114. typedef XPointer XVaNestedList;
  1115. #endif
  1116.  
  1117. typedef struct {
  1118.     XPointer client_data;
  1119.     XIMProc callback;
  1120. } XIMCallback;
  1121.  
  1122. typedef unsigned long XIMFeedback;
  1123.  
  1124. #define XIMReverse    1
  1125. #define XIMUnderline    (1<<1) 
  1126. #define XIMHighlight    (1<<2)
  1127. #define XIMPrimary     (1<<5)
  1128. #define XIMSecondary    (1<<6)
  1129. #define XIMTertiary     (1<<7)
  1130.  
  1131. typedef struct _XIMText {
  1132.     unsigned short length;
  1133.     XIMFeedback *feedback;
  1134.     Bool encoding_is_wchar; 
  1135.     union {
  1136.     char *multi_byte;
  1137.     wchar_t *wide_char;
  1138.     } string; 
  1139. } XIMText;
  1140.  
  1141. typedef struct _XIMPreeditDrawCallbackStruct {
  1142.     int caret;        /* Cursor offset within pre-edit string */
  1143.     int chg_first;    /* Starting change position */
  1144.     int chg_length;    /* Length of the change in character count */
  1145.     XIMText *text;
  1146. } XIMPreeditDrawCallbackStruct;
  1147.  
  1148. typedef enum {
  1149.     XIMForwardChar, XIMBackwardChar,
  1150.     XIMForwardWord, XIMBackwardWord,
  1151.     XIMCaretUp, XIMCaretDown,
  1152.     XIMNextLine, XIMPreviousLine,
  1153.     XIMLineStart, XIMLineEnd, 
  1154.     XIMAbsolutePosition,
  1155.     XIMDontChange
  1156. } XIMCaretDirection;
  1157.  
  1158. typedef enum {
  1159.     XIMIsInvisible,    /* Disable caret feedback */ 
  1160.     XIMIsPrimary,    /* UI defined caret feedback */
  1161.     XIMIsSecondary    /* UI defined caret feedback */
  1162. } XIMCaretStyle;
  1163.  
  1164. typedef struct _XIMPreeditCaretCallbackStruct {
  1165.     int position;         /* Caret offset within pre-edit string */
  1166.     XIMCaretDirection direction; /* Caret moves direction */
  1167.     XIMCaretStyle style;     /* Feedback of the caret */
  1168. } XIMPreeditCaretCallbackStruct;
  1169.  
  1170. typedef enum {
  1171.     XIMTextType,
  1172.     XIMBitmapType
  1173. } XIMStatusDataType;
  1174.     
  1175. typedef struct _XIMStatusDrawCallbackStruct {
  1176.     XIMStatusDataType type;
  1177.     union {
  1178.     XIMText *text;
  1179.     Pixmap  bitmap;
  1180.     } data;
  1181. } XIMStatusDrawCallbackStruct;
  1182.  
  1183. _XFUNCPROTOBEGIN
  1184.  
  1185. extern XFontStruct *XLoadQueryFont(
  1186. #if NeedFunctionPrototypes
  1187.     Display*        /* display */,
  1188.     _Xconst char*    /* name */
  1189. #endif
  1190. );
  1191.  
  1192. extern XFontStruct *XQueryFont(
  1193. #if NeedFunctionPrototypes
  1194.     Display*        /* display */,
  1195.     XID            /* font_ID */
  1196. #endif
  1197. );
  1198.  
  1199.  
  1200. extern XTimeCoord *XGetMotionEvents(
  1201. #if NeedFunctionPrototypes
  1202.     Display*        /* display */,
  1203.     Window        /* w */,
  1204.     Time        /* start */,
  1205.     Time        /* stop */,
  1206.     int*        /* nevents_return */
  1207. #endif
  1208. );
  1209.  
  1210. extern XModifierKeymap *XDeleteModifiermapEntry(
  1211. #if NeedFunctionPrototypes
  1212.     XModifierKeymap*    /* modmap */,
  1213. #if NeedWidePrototypes
  1214.     unsigned int    /* keycode_entry */,
  1215. #else
  1216.     KeyCode        /* keycode_entry */,
  1217. #endif
  1218.     int            /* modifier */
  1219. #endif
  1220. );
  1221.  
  1222. extern XModifierKeymap    *XGetModifierMapping(
  1223. #if NeedFunctionPrototypes
  1224.     Display*        /* display */
  1225. #endif
  1226. );
  1227.  
  1228. extern XModifierKeymap    *XInsertModifiermapEntry(
  1229. #if NeedFunctionPrototypes
  1230.     XModifierKeymap*    /* modmap */,
  1231. #if NeedWidePrototypes
  1232.     unsigned int    /* keycode_entry */,
  1233. #else
  1234.     KeyCode        /* keycode_entry */,
  1235. #endif
  1236.     int            /* modifier */    
  1237. #endif
  1238. );
  1239.  
  1240. extern XModifierKeymap *XNewModifiermap(
  1241. #if NeedFunctionPrototypes
  1242.     int            /* max_keys_per_mod */
  1243. #endif
  1244. );
  1245.  
  1246. extern XImage *XCreateImage(
  1247. #if NeedFunctionPrototypes
  1248.     Display*        /* display */,
  1249.     Visual*        /* visual */,
  1250.     unsigned int    /* depth */,
  1251.     int            /* format */,
  1252.     int            /* offset */,
  1253.     char*        /* data */,
  1254.     unsigned int    /* width */,
  1255.     unsigned int    /* height */,
  1256.     int            /* bitmap_pad */,
  1257.     int            /* bytes_per_line */
  1258. #endif
  1259. );
  1260. extern XImage *XGetImage(
  1261. #if NeedFunctionPrototypes
  1262.     Display*        /* display */,
  1263.     Drawable        /* d */,
  1264.     int            /* x */,
  1265.     int            /* y */,
  1266.     unsigned int    /* width */,
  1267.     unsigned int    /* height */,
  1268.     unsigned long    /* plane_mask */,
  1269.     int            /* format */
  1270. #endif
  1271. );
  1272. extern XImage *XGetSubImage(
  1273. #if NeedFunctionPrototypes
  1274.     Display*        /* display */,
  1275.     Drawable        /* d */,
  1276.     int            /* x */,
  1277.     int            /* y */,
  1278.     unsigned int    /* width */,
  1279.     unsigned int    /* height */,
  1280.     unsigned long    /* plane_mask */,
  1281.     int            /* format */,
  1282.     XImage*        /* dest_image */,
  1283.     int            /* dest_x */,
  1284.     int            /* dest_y */
  1285. #endif
  1286. );
  1287.  
  1288. /* 
  1289.  * X function declarations.
  1290.  */
  1291. extern Display *XOpenDisplay(
  1292. #if NeedFunctionPrototypes
  1293.     _Xconst char*    /* display_name */
  1294. #endif
  1295. );
  1296.  
  1297. extern void XrmInitialize(
  1298. #if NeedFunctionPrototypes
  1299.     void
  1300. #endif
  1301. );
  1302.  
  1303. extern char *XFetchBytes(
  1304. #if NeedFunctionPrototypes
  1305.     Display*        /* display */,
  1306.     int*        /* nbytes_return */
  1307. #endif
  1308. );
  1309. extern char *XFetchBuffer(
  1310. #if NeedFunctionPrototypes
  1311.     Display*        /* display */,
  1312.     int*        /* nbytes_return */,
  1313.     int            /* buffer */
  1314. #endif
  1315. );
  1316. extern char *XGetAtomName(
  1317. #if NeedFunctionPrototypes
  1318.     Display*        /* display */,
  1319.     Atom        /* atom */
  1320. #endif
  1321. );
  1322. extern char *XGetDefault(
  1323. #if NeedFunctionPrototypes
  1324.     Display*        /* display */,
  1325.     _Xconst char*    /* program */,
  1326.     _Xconst char*    /* option */          
  1327. #endif
  1328. );
  1329. extern char *XDisplayName(
  1330. #if NeedFunctionPrototypes
  1331.     _Xconst char*    /* string */
  1332. #endif
  1333. );
  1334. extern char *XKeysymToString(
  1335. #if NeedFunctionPrototypes
  1336.     KeySym        /* keysym */
  1337. #endif
  1338. );
  1339.  
  1340. extern int (*XSynchronize(
  1341. #if NeedFunctionPrototypes
  1342.     Display*        /* display */,
  1343.     Bool        /* onoff */
  1344. #endif
  1345. ))();
  1346. extern int (*XSetAfterFunction(
  1347. #if NeedFunctionPrototypes
  1348.     Display*        /* display */,
  1349.     int (*) (
  1350. #if NeedNestedPrototypes
  1351.          Display*    /* display */
  1352. #endif
  1353.             )        /* procedure */
  1354. #endif
  1355. ))();
  1356. extern Atom XInternAtom(
  1357. #if NeedFunctionPrototypes
  1358.     Display*        /* display */,
  1359.     _Xconst char*    /* atom_name */,
  1360.     Bool        /* only_if_exists */         
  1361. #endif
  1362. );
  1363. extern Colormap XCopyColormapAndFree(
  1364. #if NeedFunctionPrototypes
  1365.     Display*        /* display */,
  1366.     Colormap        /* colormap */
  1367. #endif
  1368. );
  1369. extern Colormap XCreateColormap(
  1370. #if NeedFunctionPrototypes
  1371.     Display*        /* display */,
  1372.     Window        /* w */,
  1373.     Visual*        /* visual */,
  1374.     int            /* alloc */             
  1375. #endif
  1376. );
  1377. extern Cursor XCreatePixmapCursor(
  1378. #if NeedFunctionPrototypes
  1379.     Display*        /* display */,
  1380.     Pixmap        /* source */,
  1381.     Pixmap        /* mask */,
  1382.     XColor*        /* foreground_color */,
  1383.     XColor*        /* background_color */,
  1384.     unsigned int    /* x */,
  1385.     unsigned int    /* y */               
  1386. #endif
  1387. );
  1388. extern Cursor XCreateGlyphCursor(
  1389. #if NeedFunctionPrototypes
  1390.     Display*        /* display */,
  1391.     Font        /* source_font */,
  1392.     Font        /* mask_font */,
  1393.     unsigned int    /* source_char */,
  1394.     unsigned int    /* mask_char */,
  1395.     XColor*        /* foreground_color */,
  1396.     XColor*        /* background_color */
  1397. #endif
  1398. );
  1399. extern Cursor XCreateFontCursor(
  1400. #if NeedFunctionPrototypes
  1401.     Display*        /* display */,
  1402.     unsigned int    /* shape */
  1403. #endif
  1404. );
  1405. extern Font XLoadFont(
  1406. #if NeedFunctionPrototypes
  1407.     Display*        /* display */,
  1408.     _Xconst char*    /* name */
  1409. #endif
  1410. );
  1411. extern GC XCreateGC(
  1412. #if NeedFunctionPrototypes
  1413.     Display*        /* display */,
  1414.     Drawable        /* d */,
  1415.     unsigned long    /* valuemask */,
  1416.     XGCValues*        /* values */
  1417. #endif
  1418. );
  1419. extern GContext XGContextFromGC(
  1420. #if NeedFunctionPrototypes
  1421.     GC            /* gc */
  1422. #endif
  1423. );
  1424. extern void XFlushGC(
  1425. #if NeedFunctionPrototypes
  1426.     Display*        /* display */,
  1427.     GC            /* gc */
  1428. #endif
  1429. );
  1430. extern Pixmap XCreatePixmap(
  1431. #if NeedFunctionPrototypes
  1432.     Display*        /* display */,
  1433.     Drawable        /* d */,
  1434.     unsigned int    /* width */,
  1435.     unsigned int    /* height */,
  1436.     unsigned int    /* depth */                
  1437. #endif
  1438. );
  1439. extern Pixmap XCreateBitmapFromData(
  1440. #if NeedFunctionPrototypes
  1441.     Display*        /* display */,
  1442.     Drawable        /* d */,
  1443.     _Xconst char*    /* data */,
  1444.     unsigned int    /* width */,
  1445.     unsigned int    /* height */
  1446. #endif
  1447. );
  1448. extern Pixmap XCreatePixmapFromBitmapData(
  1449. #if NeedFunctionPrototypes
  1450.     Display*        /* display */,
  1451.     Drawable        /* d */,
  1452.     char*        /* data */,
  1453.     unsigned int    /* width */,
  1454.     unsigned int    /* height */,
  1455.     unsigned long    /* fg */,
  1456.     unsigned long    /* bg */,
  1457.     unsigned int    /* depth */
  1458. #endif
  1459. );
  1460. extern Window XCreateSimpleWindow(
  1461. #if NeedFunctionPrototypes
  1462.     Display*        /* display */,
  1463.     Window        /* parent */,
  1464.     int            /* x */,
  1465.     int            /* y */,
  1466.     unsigned int    /* width */,
  1467.     unsigned int    /* height */,
  1468.     unsigned int    /* border_width */,
  1469.     unsigned long    /* border */,
  1470.     unsigned long    /* background */
  1471. #endif
  1472. );
  1473. extern Window XGetSelectionOwner(
  1474. #if NeedFunctionPrototypes
  1475.     Display*        /* display */,
  1476.     Atom        /* selection */
  1477. #endif
  1478. );
  1479. extern Window XCreateWindow(
  1480. #if NeedFunctionPrototypes
  1481.     Display*        /* display */,
  1482.     Window        /* parent */,
  1483.     int            /* x */,
  1484.     int            /* y */,
  1485.     unsigned int    /* width */,
  1486.     unsigned int    /* height */,
  1487.     unsigned int    /* border_width */,
  1488.     int            /* depth */,
  1489.     unsigned int    /* class */,
  1490.     Visual*        /* visual */,
  1491.     unsigned long    /* valuemask */,
  1492.     XSetWindowAttributes*    /* attributes */
  1493. #endif
  1494. ); 
  1495. extern Colormap *XListInstalledColormaps(
  1496. #if NeedFunctionPrototypes
  1497.     Display*        /* display */,
  1498.     Window        /* w */,
  1499.     int*        /* num_return */
  1500. #endif
  1501. );
  1502. extern char **XListFonts(
  1503. #if NeedFunctionPrototypes
  1504.     Display*        /* display */,
  1505.     _Xconst char*    /* pattern */,
  1506.     int            /* maxnames */,
  1507.     int*        /* actual_count_return */
  1508. #endif
  1509. );
  1510. extern char **XListFontsWithInfo(
  1511. #if NeedFunctionPrototypes
  1512.     Display*        /* display */,
  1513.     _Xconst char*    /* pattern */,
  1514.     int            /* maxnames */,
  1515.     int*        /* count_return */,
  1516.     XFontStruct**    /* info_return */
  1517. #endif
  1518. );
  1519. extern char **XGetFontPath(
  1520. #if NeedFunctionPrototypes
  1521.     Display*        /* display */,
  1522.     int*        /* npaths_return */
  1523. #endif
  1524. );
  1525. extern char **XListExtensions(
  1526. #if NeedFunctionPrototypes
  1527.     Display*        /* display */,
  1528.     int*        /* nextensions_return */
  1529. #endif
  1530. );
  1531. extern Atom *XListProperties(
  1532. #if NeedFunctionPrototypes
  1533.     Display*        /* display */,
  1534.     Window        /* w */,
  1535.     int*        /* num_prop_return */
  1536. #endif
  1537. );
  1538. extern XHostAddress *XListHosts(
  1539. #if NeedFunctionPrototypes
  1540.     Display*        /* display */,
  1541.     int*        /* nhosts_return */,
  1542.     Bool*        /* state_return */
  1543. #endif
  1544. );
  1545. extern KeySym XKeycodeToKeysym(
  1546. #if NeedFunctionPrototypes
  1547.     Display*        /* display */,
  1548. #if NeedWidePrototypes
  1549.     unsigned int    /* keycode */,
  1550. #else
  1551.     KeyCode        /* keycode */,
  1552. #endif
  1553.     int            /* index */
  1554. #endif
  1555. );
  1556. extern KeySym XLookupKeysym(
  1557. #if NeedFunctionPrototypes
  1558.     XKeyEvent*        /* key_event */,
  1559.     int            /* index */
  1560. #endif
  1561. );
  1562. extern KeySym *XGetKeyboardMapping(
  1563. #if NeedFunctionPrototypes
  1564.     Display*        /* display */,
  1565. #if NeedWidePrototypes
  1566.     unsigned int    /* first_keycode */,
  1567. #else
  1568.     KeyCode        /* first_keycode */,
  1569. #endif
  1570.     int            /* keycode_count */,
  1571.     int*        /* keysyms_per_keycode_return */
  1572. #endif
  1573. );
  1574. extern KeySym XStringToKeysym(
  1575. #if NeedFunctionPrototypes
  1576.     _Xconst char*    /* string */
  1577. #endif
  1578. );
  1579. extern long XMaxRequestSize(
  1580. #if NeedFunctionPrototypes
  1581.     Display*        /* display */
  1582. #endif
  1583. );
  1584. extern long XExtendedMaxRequestSize(
  1585. #if NeedFunctionPrototypes
  1586.     Display*        /* display */
  1587. #endif
  1588. );
  1589. extern char *XResourceManagerString(
  1590. #if NeedFunctionPrototypes
  1591.     Display*        /* display */
  1592. #endif
  1593. );
  1594. extern char *XScreenResourceString(
  1595. #if NeedFunctionPrototypes
  1596.     Screen*        /* screen */
  1597. #endif
  1598. );
  1599. extern unsigned long XDisplayMotionBufferSize(
  1600. #if NeedFunctionPrototypes
  1601.     Display*        /* display */
  1602. #endif
  1603. );
  1604. extern VisualID XVisualIDFromVisual(
  1605. #if NeedFunctionPrototypes
  1606.     Visual*        /* visual */
  1607. #endif
  1608. );
  1609.  
  1610. /* routines for dealing with extensions */
  1611.  
  1612. extern XExtCodes *XInitExtension(
  1613. #if NeedFunctionPrototypes
  1614.     Display*        /* display */,
  1615.     _Xconst char*    /* name */
  1616. #endif
  1617. );
  1618.  
  1619. extern XExtCodes *XAddExtension(
  1620. #if NeedFunctionPrototypes
  1621.     Display*        /* display */
  1622. #endif
  1623. );
  1624. extern XExtData *XFindOnExtensionList(
  1625. #if NeedFunctionPrototypes
  1626.     XExtData**        /* structure */,
  1627.     int            /* number */
  1628. #endif
  1629. );
  1630. extern XExtData **XEHeadOfExtensionList(
  1631. #if NeedFunctionPrototypes
  1632.     XEDataObject    /* object */
  1633. #endif
  1634. );
  1635.  
  1636. /* these are routines for which there are also macros */
  1637. extern Window XRootWindow(
  1638. #if NeedFunctionPrototypes
  1639.     Display*        /* display */,
  1640.     int            /* screen_number */
  1641. #endif
  1642. );
  1643. extern Window XDefaultRootWindow(
  1644. #if NeedFunctionPrototypes
  1645.     Display*        /* display */
  1646. #endif
  1647. );
  1648. extern Window XRootWindowOfScreen(
  1649. #if NeedFunctionPrototypes
  1650.     Screen*        /* screen */
  1651. #endif
  1652. );
  1653. extern Visual *XDefaultVisual(
  1654. #if NeedFunctionPrototypes
  1655.     Display*        /* display */,
  1656.     int            /* screen_number */
  1657. #endif
  1658. );
  1659. extern Visual *XDefaultVisualOfScreen(
  1660. #if NeedFunctionPrototypes
  1661.     Screen*        /* screen */
  1662. #endif
  1663. );
  1664. extern GC XDefaultGC(
  1665. #if NeedFunctionPrototypes
  1666.     Display*        /* display */,
  1667.     int            /* screen_number */
  1668. #endif
  1669. );
  1670. extern GC XDefaultGCOfScreen(
  1671. #if NeedFunctionPrototypes
  1672.     Screen*        /* screen */
  1673. #endif
  1674. );
  1675. extern unsigned long XBlackPixel(
  1676. #if NeedFunctionPrototypes
  1677.     Display*        /* display */,
  1678.     int            /* screen_number */
  1679. #endif
  1680. );
  1681. extern unsigned long XWhitePixel(
  1682. #if NeedFunctionPrototypes
  1683.     Display*        /* display */,
  1684.     int            /* screen_number */
  1685. #endif
  1686. );
  1687. extern unsigned long XAllPlanes(
  1688. #if NeedFunctionPrototypes
  1689.     void
  1690. #endif
  1691. );
  1692. extern unsigned long XBlackPixelOfScreen(
  1693. #if NeedFunctionPrototypes
  1694.     Screen*        /* screen */
  1695. #endif
  1696. );
  1697. extern unsigned long XWhitePixelOfScreen(
  1698. #if NeedFunctionPrototypes
  1699.     Screen*        /* screen */
  1700. #endif
  1701. );
  1702. extern unsigned long XNextRequest(
  1703. #if NeedFunctionPrototypes
  1704.     Display*        /* display */
  1705. #endif
  1706. );
  1707. extern unsigned long XLastKnownRequestProcessed(
  1708. #if NeedFunctionPrototypes
  1709.     Display*        /* display */
  1710. #endif
  1711. );
  1712. extern char *XServerVendor(
  1713. #if NeedFunctionPrototypes
  1714.     Display*        /* display */
  1715. #endif
  1716. );
  1717. extern char *XDisplayString(
  1718. #if NeedFunctionPrototypes
  1719.     Display*        /* display */
  1720. #endif
  1721. );
  1722. extern Colormap XDefaultColormap(
  1723. #if NeedFunctionPrototypes
  1724.     Display*        /* display */,
  1725.     int            /* screen_number */
  1726. #endif
  1727. );
  1728. extern Colormap XDefaultColormapOfScreen(
  1729. #if NeedFunctionPrototypes
  1730.     Screen*        /* screen */
  1731. #endif
  1732. );
  1733. extern Display *XDisplayOfScreen(
  1734. #if NeedFunctionPrototypes
  1735.     Screen*        /* screen */
  1736. #endif
  1737. );
  1738. extern Screen *XScreenOfDisplay(
  1739. #if NeedFunctionPrototypes
  1740.     Display*        /* display */,
  1741.     int            /* screen_number */
  1742. #endif
  1743. );
  1744. extern Screen *XDefaultScreenOfDisplay(
  1745. #if NeedFunctionPrototypes
  1746.     Display*        /* display */
  1747. #endif
  1748. );
  1749. extern long XEventMaskOfScreen(
  1750. #if NeedFunctionPrototypes
  1751.     Screen*        /* screen */
  1752. #endif
  1753. );
  1754.  
  1755. extern int XScreenNumberOfScreen(
  1756. #if NeedFunctionPrototypes
  1757.     Screen*        /* screen */
  1758. #endif
  1759. );
  1760.  
  1761. typedef int (*XErrorHandler) (        /* WARNING, this type not in Xlib spec */
  1762. #if NeedFunctionPrototypes
  1763.     Display*        /* display */,
  1764.     XErrorEvent*    /* error_event */
  1765. #endif
  1766. );
  1767.  
  1768. extern XErrorHandler XSetErrorHandler (
  1769. #if NeedFunctionPrototypes
  1770.     XErrorHandler    /* handler */
  1771. #endif
  1772. );
  1773.  
  1774.  
  1775. typedef int (*XIOErrorHandler) (    /* WARNING, this type not in Xlib spec */
  1776. #if NeedFunctionPrototypes
  1777.     Display*        /* display */
  1778. #endif
  1779. );
  1780.  
  1781. extern XIOErrorHandler XSetIOErrorHandler (
  1782. #if NeedFunctionPrototypes
  1783.     XIOErrorHandler    /* handler */
  1784. #endif
  1785. );
  1786.  
  1787.  
  1788. extern XPixmapFormatValues *XListPixmapFormats(
  1789. #if NeedFunctionPrototypes
  1790.     Display*        /* display */,
  1791.     int*        /* count_return */
  1792. #endif
  1793. );
  1794. extern int *XListDepths(
  1795. #if NeedFunctionPrototypes
  1796.     Display*        /* display */,
  1797.     int            /* screen_number */,
  1798.     int*        /* count_return */
  1799. #endif
  1800. );
  1801.  
  1802. /* ICCCM routines for things that don't require special include files; */
  1803. /* other declarations are given in Xutil.h                             */
  1804. extern Status XReconfigureWMWindow(
  1805. #if NeedFunctionPrototypes
  1806.     Display*        /* display */,
  1807.     Window        /* w */,
  1808.     int            /* screen_number */,
  1809.     unsigned int    /* mask */,
  1810.     XWindowChanges*    /* changes */
  1811. #endif
  1812. );
  1813.  
  1814. extern Status XGetWMProtocols(
  1815. #if NeedFunctionPrototypes
  1816.     Display*        /* display */,
  1817.     Window        /* w */,
  1818.     Atom**        /* protocols_return */,
  1819.     int*        /* count_return */
  1820. #endif
  1821. );
  1822. extern Status XSetWMProtocols(
  1823. #if NeedFunctionPrototypes
  1824.     Display*        /* display */,
  1825.     Window        /* w */,
  1826.     Atom*        /* protocols */,
  1827.     int            /* count */
  1828. #endif
  1829. );
  1830. extern Status XIconifyWindow(
  1831. #if NeedFunctionPrototypes
  1832.     Display*        /* display */,
  1833.     Window        /* w */,
  1834.     int            /* screen_number */
  1835. #endif
  1836. );
  1837. extern Status XWithdrawWindow(
  1838. #if NeedFunctionPrototypes
  1839.     Display*        /* display */,
  1840.     Window        /* w */,
  1841.     int            /* screen_number */
  1842. #endif
  1843. );
  1844. extern Status XGetCommand(
  1845. #if NeedFunctionPrototypes
  1846.     Display*        /* display */,
  1847.     Window        /* w */,
  1848.     char***        /* argv_return */,
  1849.     int*        /* argc_return */
  1850. #endif
  1851. );
  1852. extern Status XGetWMColormapWindows(
  1853. #if NeedFunctionPrototypes
  1854.     Display*        /* display */,
  1855.     Window        /* w */,
  1856.     Window**        /* windows_return */,
  1857.     int*        /* count_return */
  1858. #endif
  1859. );
  1860. extern Status XSetWMColormapWindows(
  1861. #if NeedFunctionPrototypes
  1862.     Display*        /* display */,
  1863.     Window        /* w */,
  1864.     Window*        /* colormap_windows */,
  1865.     int            /* count */
  1866. #endif
  1867. );
  1868. extern void XFreeStringList(
  1869. #if NeedFunctionPrototypes
  1870.     char**        /* list */
  1871. #endif
  1872. );
  1873. extern void XSetTransientForHint(
  1874. #if NeedFunctionPrototypes
  1875.     Display*        /* display */,
  1876.     Window        /* w */,
  1877.     Window        /* prop_window */
  1878. #endif
  1879. );
  1880.  
  1881. /* The following are given in alphabetical order */
  1882.  
  1883. extern void XActivateScreenSaver(
  1884. #if NeedFunctionPrototypes
  1885.     Display*        /* display */
  1886. #endif
  1887. );
  1888.  
  1889. extern void XAddHost(
  1890. #if NeedFunctionPrototypes
  1891.     Display*        /* display */,
  1892.     XHostAddress*    /* host */
  1893. #endif
  1894. );
  1895.  
  1896. extern void XAddHosts(
  1897. #if NeedFunctionPrototypes
  1898.     Display*        /* display */,
  1899.     XHostAddress*    /* hosts */,
  1900.     int            /* num_hosts */    
  1901. #endif
  1902. );
  1903.  
  1904. extern void XAddToExtensionList(
  1905. #if NeedFunctionPrototypes
  1906.     struct _XExtData**    /* structure */,
  1907.     XExtData*        /* ext_data */
  1908. #endif
  1909. );
  1910.  
  1911. extern void XAddToSaveSet(
  1912. #if NeedFunctionPrototypes
  1913.     Display*        /* display */,
  1914.     Window        /* w */
  1915. #endif
  1916. );
  1917.  
  1918. extern Status XAllocColor(
  1919. #if NeedFunctionPrototypes
  1920.     Display*        /* display */,
  1921.     Colormap        /* colormap */,
  1922.     XColor*        /* screen_in_out */
  1923. #endif
  1924. );
  1925.  
  1926. extern Status XAllocColorCells(
  1927. #if NeedFunctionPrototypes
  1928.     Display*        /* display */,
  1929.     Colormap        /* colormap */,
  1930.     Bool            /* contig */,
  1931.     unsigned long*    /* plane_masks_return */,
  1932.     unsigned int    /* nplanes */,
  1933.     unsigned long*    /* pixels_return */,
  1934.     unsigned int     /* npixels */
  1935. #endif
  1936. );
  1937.  
  1938. extern Status XAllocColorPlanes(
  1939. #if NeedFunctionPrototypes
  1940.     Display*        /* display */,
  1941.     Colormap        /* colormap */,
  1942.     Bool        /* contig */,
  1943.     unsigned long*    /* pixels_return */,
  1944.     int            /* ncolors */,
  1945.     int            /* nreds */,
  1946.     int            /* ngreens */,
  1947.     int            /* nblues */,
  1948.     unsigned long*    /* rmask_return */,
  1949.     unsigned long*    /* gmask_return */,
  1950.     unsigned long*    /* bmask_return */
  1951. #endif
  1952. );
  1953.  
  1954. extern Status XAllocNamedColor(
  1955. #if NeedFunctionPrototypes
  1956.     Display*        /* display */,
  1957.     Colormap        /* colormap */,
  1958.     _Xconst char*    /* color_name */,
  1959.     XColor*        /* screen_def_return */,
  1960.     XColor*        /* exact_def_return */
  1961. #endif
  1962. );
  1963.  
  1964. extern void XAllowEvents(
  1965. #if NeedFunctionPrototypes
  1966.     Display*        /* display */,
  1967.     int            /* event_mode */,
  1968.     Time        /* time */
  1969. #endif
  1970. );
  1971.  
  1972. extern void XAutoRepeatOff(
  1973. #if NeedFunctionPrototypes
  1974.     Display*        /* display */
  1975. #endif
  1976. );
  1977.  
  1978. extern void XAutoRepeatOn(
  1979. #if NeedFunctionPrototypes
  1980.     Display*        /* display */
  1981. #endif
  1982. );
  1983.  
  1984. extern void XBell(
  1985. #if NeedFunctionPrototypes
  1986.     Display*        /* display */,
  1987.     int            /* percent */
  1988. #endif
  1989. );
  1990.  
  1991. extern int XBitmapBitOrder(
  1992. #if NeedFunctionPrototypes
  1993.     Display*        /* display */
  1994. #endif
  1995. );
  1996.  
  1997. extern int XBitmapPad(
  1998. #if NeedFunctionPrototypes
  1999.     Display*        /* display */
  2000. #endif
  2001. );
  2002.  
  2003. extern int XBitmapUnit(
  2004. #if NeedFunctionPrototypes
  2005.     Display*        /* display */
  2006. #endif
  2007. );
  2008.  
  2009. extern int XCellsOfScreen(
  2010. #if NeedFunctionPrototypes
  2011.     Screen*        /* screen */
  2012. #endif
  2013. );
  2014.  
  2015. extern void XChangeActivePointerGrab(
  2016. #if NeedFunctionPrototypes
  2017.     Display*        /* display */,
  2018.     unsigned int    /* event_mask */,
  2019.     Cursor        /* cursor */,
  2020.     Time        /* time */
  2021. #endif
  2022. );
  2023.  
  2024. extern void XChangeGC(
  2025. #if NeedFunctionPrototypes
  2026.     Display*        /* display */,
  2027.     GC            /* gc */,
  2028.     unsigned long    /* valuemask */,
  2029.     XGCValues*        /* values */
  2030. #endif
  2031. );
  2032.  
  2033. extern void XChangeKeyboardControl(
  2034. #if NeedFunctionPrototypes
  2035.     Display*        /* display */,
  2036.     unsigned long    /* value_mask */,
  2037.     XKeyboardControl*    /* values */
  2038. #endif
  2039. );
  2040.  
  2041. extern void XChangeKeyboardMapping(
  2042. #if NeedFunctionPrototypes
  2043.     Display*        /* display */,
  2044.     int            /* first_keycode */,
  2045.     int            /* keysyms_per_keycode */,
  2046.     KeySym*        /* keysyms */,
  2047.     int            /* num_codes */
  2048. #endif
  2049. );
  2050.  
  2051. extern void XChangePointerControl(
  2052. #if NeedFunctionPrototypes
  2053.     Display*        /* display */,
  2054.     Bool        /* do_accel */,
  2055.     Bool        /* do_threshold */,
  2056.     int            /* accel_numerator */,
  2057.     int            /* accel_denominator */,
  2058.     int            /* threshold */
  2059. #endif
  2060. );
  2061.  
  2062. extern void XChangeProperty(
  2063. #if NeedFunctionPrototypes
  2064.     Display*        /* display */,
  2065.     Window        /* w */,
  2066.     Atom        /* property */,
  2067.     Atom        /* type */,
  2068.     int            /* format */,
  2069.     int            /* mode */,
  2070.     _Xconst unsigned char*    /* data */,
  2071.     int            /* nelements */
  2072. #endif
  2073. );
  2074.  
  2075. extern void XChangeSaveSet(
  2076. #if NeedFunctionPrototypes
  2077.     Display*        /* display */,
  2078.     Window        /* w */,
  2079.     int            /* change_mode */
  2080. #endif
  2081. );
  2082.  
  2083. extern void XChangeWindowAttributes(
  2084. #if NeedFunctionPrototypes
  2085.     Display*        /* display */,
  2086.     Window        /* w */,
  2087.     unsigned long    /* valuemask */,
  2088.     XSetWindowAttributes* /* attributes */
  2089. #endif
  2090. );
  2091.  
  2092. extern Bool XCheckIfEvent(
  2093. #if NeedFunctionPrototypes
  2094.     Display*        /* display */,
  2095.     XEvent*        /* event_return */,
  2096.     Bool (*) (
  2097. #if NeedNestedPrototypes
  2098.            Display*            /* display */,
  2099.                XEvent*            /* event */,
  2100.                XPointer            /* arg */
  2101. #endif
  2102.              )        /* predicate */,
  2103.     XPointer        /* arg */
  2104. #endif
  2105. );
  2106.  
  2107. extern Bool XCheckMaskEvent(
  2108. #if NeedFunctionPrototypes
  2109.     Display*        /* display */,
  2110.     long        /* event_mask */,
  2111.     XEvent*        /* event_return */
  2112. #endif
  2113. );
  2114.  
  2115. extern Bool XCheckTypedEvent(
  2116. #if NeedFunctionPrototypes
  2117.     Display*        /* display */,
  2118.     int            /* event_type */,
  2119.     XEvent*        /* event_return */
  2120. #endif
  2121. );
  2122.  
  2123. extern Bool XCheckTypedWindowEvent(
  2124. #if NeedFunctionPrototypes
  2125.     Display*        /* display */,
  2126.     Window        /* w */,
  2127.     int            /* event_type */,
  2128.     XEvent*        /* event_return */
  2129. #endif
  2130. );
  2131.  
  2132. extern Bool XCheckWindowEvent(
  2133. #if NeedFunctionPrototypes
  2134.     Display*        /* display */,
  2135.     Window        /* w */,
  2136.     long        /* event_mask */,
  2137.     XEvent*        /* event_return */
  2138. #endif
  2139. );
  2140.  
  2141. extern void XCirculateSubwindows(
  2142. #if NeedFunctionPrototypes
  2143.     Display*        /* display */,
  2144.     Window        /* w */,
  2145.     int            /* direction */
  2146. #endif
  2147. );
  2148.  
  2149. extern void XCirculateSubwindowsDown(
  2150. #if NeedFunctionPrototypes
  2151.     Display*        /* display */,
  2152.     Window        /* w */
  2153. #endif
  2154. );
  2155.  
  2156. extern void XCirculateSubwindowsUp(
  2157. #if NeedFunctionPrototypes
  2158.     Display*        /* display */,
  2159.     Window        /* w */
  2160. #endif
  2161. );
  2162.  
  2163. extern void XClearArea(
  2164. #if NeedFunctionPrototypes
  2165.     Display*        /* display */,
  2166.     Window        /* w */,
  2167.     int            /* x */,
  2168.     int            /* y */,
  2169.     unsigned int    /* width */,
  2170.     unsigned int    /* height */,
  2171.     Bool        /* exposures */
  2172. #endif
  2173. );
  2174.  
  2175. extern void XClearWindow(
  2176. #if NeedFunctionPrototypes
  2177.     Display*        /* display */,
  2178.     Window        /* w */
  2179. #endif
  2180. );
  2181.  
  2182. extern void XCloseDisplay(
  2183. #if NeedFunctionPrototypes
  2184.     Display*        /* display */
  2185. #endif
  2186. );
  2187.  
  2188. extern void XConfigureWindow(
  2189. #if NeedFunctionPrototypes
  2190.     Display*        /* display */,
  2191.     Window        /* w */,
  2192.     unsigned int    /* value_mask */,
  2193.     XWindowChanges*    /* values */         
  2194. #endif
  2195. );
  2196.  
  2197. extern int XConnectionNumber(
  2198. #if NeedFunctionPrototypes
  2199.     Display*        /* display */
  2200. #endif
  2201. );
  2202.  
  2203. extern void XConvertSelection(
  2204. #if NeedFunctionPrototypes
  2205.     Display*        /* display */,
  2206.     Atom        /* selection */,
  2207.     Atom         /* target */,
  2208.     Atom        /* property */,
  2209.     Window        /* requestor */,
  2210.     Time        /* time */
  2211. #endif
  2212. );
  2213.  
  2214. extern void XCopyArea(
  2215. #if NeedFunctionPrototypes
  2216.     Display*        /* display */,
  2217.     Drawable        /* src */,
  2218.     Drawable        /* dest */,
  2219.     GC            /* gc */,
  2220.     int            /* src_x */,
  2221.     int            /* src_y */,
  2222.     unsigned int    /* width */,
  2223.     unsigned int    /* height */,
  2224.     int            /* dest_x */,
  2225.     int            /* dest_y */
  2226. #endif
  2227. );
  2228.  
  2229. extern void XCopyGC(
  2230. #if NeedFunctionPrototypes
  2231.     Display*        /* display */,
  2232.     GC            /* src */,
  2233.     unsigned long    /* valuemask */,
  2234.     GC            /* dest */
  2235. #endif
  2236. );
  2237.  
  2238. extern void XCopyPlane(
  2239. #if NeedFunctionPrototypes
  2240.     Display*        /* display */,
  2241.     Drawable        /* src */,
  2242.     Drawable        /* dest */,
  2243.     GC            /* gc */,
  2244.     int            /* src_x */,
  2245.     int            /* src_y */,
  2246.     unsigned int    /* width */,
  2247.     unsigned int    /* height */,
  2248.     int            /* dest_x */,
  2249.     int            /* dest_y */,
  2250.     unsigned long    /* plane */
  2251. #endif
  2252. );
  2253.  
  2254. extern int XDefaultDepth(
  2255. #if NeedFunctionPrototypes
  2256.     Display*        /* display */,
  2257.     int            /* screen_number */
  2258. #endif
  2259. );
  2260.  
  2261. extern int XDefaultDepthOfScreen(
  2262. #if NeedFunctionPrototypes
  2263.     Screen*        /* screen */
  2264. #endif
  2265. );
  2266.  
  2267. extern int XDefaultScreen(
  2268. #if NeedFunctionPrototypes
  2269.     Display*        /* display */
  2270. #endif
  2271. );
  2272.  
  2273. extern void XDefineCursor(
  2274. #if NeedFunctionPrototypes
  2275.     Display*        /* display */,
  2276.     Window        /* w */,
  2277.     Cursor        /* cursor */
  2278. #endif
  2279. );
  2280.  
  2281. extern void XDeleteProperty(
  2282. #if NeedFunctionPrototypes
  2283.     Display*        /* display */,
  2284.     Window        /* w */,
  2285.     Atom        /* property */
  2286. #endif
  2287. );
  2288.  
  2289. extern void XDestroyWindow(
  2290. #if NeedFunctionPrototypes
  2291.     Display*        /* display */,
  2292.     Window        /* w */
  2293. #endif
  2294. );
  2295.  
  2296. extern void XDestroySubwindows(
  2297. #if NeedFunctionPrototypes
  2298.     Display*        /* display */,
  2299.     Window        /* w */
  2300. #endif
  2301. );
  2302.  
  2303. extern int XDoesBackingStore(
  2304. #if NeedFunctionPrototypes
  2305.     Screen*        /* screen */    
  2306. #endif
  2307. );
  2308.  
  2309. extern Bool XDoesSaveUnders(
  2310. #if NeedFunctionPrototypes
  2311.     Screen*        /* screen */
  2312. #endif
  2313. );
  2314.  
  2315. extern void XDisableAccessControl(
  2316. #if NeedFunctionPrototypes
  2317.     Display*        /* display */
  2318. #endif
  2319. );
  2320.  
  2321.  
  2322. extern int XDisplayCells(
  2323. #if NeedFunctionPrototypes
  2324.     Display*        /* display */,
  2325.     int            /* screen_number */
  2326. #endif
  2327. );
  2328.  
  2329. extern int XDisplayHeight(
  2330. #if NeedFunctionPrototypes
  2331.     Display*        /* display */,
  2332.     int            /* screen_number */
  2333. #endif
  2334. );
  2335.  
  2336. extern int XDisplayHeightMM(
  2337. #if NeedFunctionPrototypes
  2338.     Display*        /* display */,
  2339.     int            /* screen_number */
  2340. #endif
  2341. );
  2342.  
  2343. extern void XDisplayKeycodes(
  2344. #if NeedFunctionPrototypes
  2345.     Display*        /* display */,
  2346.     int*        /* min_keycodes_return */,
  2347.     int*        /* max_keycodes_return */
  2348. #endif
  2349. );
  2350.  
  2351. extern int XDisplayPlanes(
  2352. #if NeedFunctionPrototypes
  2353.     Display*        /* display */,
  2354.     int            /* screen_number */
  2355. #endif
  2356. );
  2357.  
  2358. extern int XDisplayWidth(
  2359. #if NeedFunctionPrototypes
  2360.     Display*        /* display */,
  2361.     int            /* screen_number */
  2362. #endif
  2363. );
  2364.  
  2365. extern int XDisplayWidthMM(
  2366. #if NeedFunctionPrototypes
  2367.     Display*        /* display */,
  2368.     int            /* screen_number */
  2369. #endif
  2370. );
  2371.  
  2372. extern void XDrawArc(
  2373. #if NeedFunctionPrototypes
  2374.     Display*        /* display */,
  2375.     Drawable        /* d */,
  2376.     GC            /* gc */,
  2377.     int            /* x */,
  2378.     int            /* y */,
  2379.     unsigned int    /* width */,
  2380.     unsigned int    /* height */,
  2381.     int            /* angle1 */,
  2382.     int            /* angle2 */
  2383. #endif
  2384. );
  2385.  
  2386. extern void XDrawArcs(
  2387. #if NeedFunctionPrototypes
  2388.     Display*        /* display */,
  2389.     Drawable        /* d */,
  2390.     GC            /* gc */,
  2391.     XArc*        /* arcs */,
  2392.     int            /* narcs */
  2393. #endif
  2394. );
  2395.  
  2396. extern void XDrawImageString(
  2397. #if NeedFunctionPrototypes
  2398.     Display*        /* display */,
  2399.     Drawable        /* d */,
  2400.     GC            /* gc */,
  2401.     int            /* x */,
  2402.     int            /* y */,
  2403.     _Xconst char*    /* string */,
  2404.     int            /* length */
  2405. #endif
  2406. );
  2407.  
  2408. extern void XDrawImageString16(
  2409. #if NeedFunctionPrototypes
  2410.     Display*        /* display */,
  2411.     Drawable        /* d */,
  2412.     GC            /* gc */,
  2413.     int            /* x */,
  2414.     int            /* y */,
  2415.     _Xconst XChar2b*    /* string */,
  2416.     int            /* length */
  2417. #endif
  2418. );
  2419.  
  2420. extern void XDrawLine(
  2421. #if NeedFunctionPrototypes
  2422.     Display*        /* display */,
  2423.     Drawable        /* d */,
  2424.     GC            /* gc */,
  2425.     int            /* x1 */,
  2426.     int            /* y1 */,
  2427.     int            /* x2 */,
  2428.     int            /* y2 */
  2429. #endif
  2430. );
  2431.  
  2432. extern void XDrawLines(
  2433. #if NeedFunctionPrototypes
  2434.     Display*        /* display */,
  2435.     Drawable        /* d */,
  2436.     GC            /* gc */,
  2437.     XPoint*        /* points */,
  2438.     int            /* npoints */,
  2439.     int            /* mode */
  2440. #endif
  2441. );
  2442.  
  2443. extern void XDrawPoint(
  2444. #if NeedFunctionPrototypes
  2445.     Display*        /* display */,
  2446.     Drawable        /* d */,
  2447.     GC            /* gc */,
  2448.     int            /* x */,
  2449.     int            /* y */
  2450. #endif
  2451. );
  2452.  
  2453. extern void XDrawPoints(
  2454. #if NeedFunctionPrototypes
  2455.     Display*        /* display */,
  2456.     Drawable        /* d */,
  2457.     GC            /* gc */,
  2458.     XPoint*        /* points */,
  2459.     int            /* npoints */,
  2460.     int            /* mode */
  2461. #endif
  2462. );
  2463.  
  2464. extern void XDrawRectangle(
  2465. #if NeedFunctionPrototypes
  2466.     Display*        /* display */,
  2467.     Drawable        /* d */,
  2468.     GC            /* gc */,
  2469.     int            /* x */,
  2470.     int            /* y */,
  2471.     unsigned int    /* width */,
  2472.     unsigned int    /* height */
  2473. #endif
  2474. );
  2475.  
  2476. extern void XDrawRectangles(
  2477. #if NeedFunctionPrototypes
  2478.     Display*        /* display */,
  2479.     Drawable        /* d */,
  2480.     GC            /* gc */,
  2481.     XRectangle*        /* rectangles */,
  2482.     int            /* nrectangles */
  2483. #endif
  2484. );
  2485.  
  2486. extern void XDrawSegments(
  2487. #if NeedFunctionPrototypes
  2488.     Display*        /* display */,
  2489.     Drawable        /* d */,
  2490.     GC            /* gc */,
  2491.     XSegment*        /* segments */,
  2492.     int            /* nsegments */
  2493. #endif
  2494. );
  2495.  
  2496. extern void XDrawString(
  2497. #if NeedFunctionPrototypes
  2498.     Display*        /* display */,
  2499.     Drawable        /* d */,
  2500.     GC            /* gc */,
  2501.     int            /* x */,
  2502.     int            /* y */,
  2503.     _Xconst char*    /* string */,
  2504.     int            /* length */
  2505. #endif
  2506. );
  2507.  
  2508. extern void XDrawString16(
  2509. #if NeedFunctionPrototypes
  2510.     Display*        /* display */,
  2511.     Drawable        /* d */,
  2512.     GC            /* gc */,
  2513.     int            /* x */,
  2514.     int            /* y */,
  2515.     _Xconst XChar2b*    /* string */,
  2516.     int            /* length */
  2517. #endif
  2518. );
  2519.  
  2520. extern void XDrawText(
  2521. #if NeedFunctionPrototypes
  2522.     Display*        /* display */,
  2523.     Drawable        /* d */,
  2524.     GC            /* gc */,
  2525.     int            /* x */,
  2526.     int            /* y */,
  2527.     XTextItem*        /* items */,
  2528.     int            /* nitems */
  2529. #endif
  2530. );
  2531.  
  2532. extern void XDrawText16(
  2533. #if NeedFunctionPrototypes
  2534.     Display*        /* display */,
  2535.     Drawable        /* d */,
  2536.     GC            /* gc */,
  2537.     int            /* x */,
  2538.     int            /* y */,
  2539.     XTextItem16*    /* items */,
  2540.     int            /* nitems */
  2541. #endif
  2542. );
  2543.  
  2544. extern void XEnableAccessControl(
  2545. #if NeedFunctionPrototypes
  2546.     Display*        /* display */
  2547. #endif
  2548. );
  2549.  
  2550. extern int XEventsQueued(
  2551. #if NeedFunctionPrototypes
  2552.     Display*        /* display */,
  2553.     int            /* mode */
  2554. #endif
  2555. );
  2556.  
  2557. extern Status XFetchName(
  2558. #if NeedFunctionPrototypes
  2559.     Display*        /* display */,
  2560.     Window        /* w */,
  2561.     char**        /* window_name_return */
  2562. #endif
  2563. );
  2564.  
  2565. extern void XFillArc(
  2566. #if NeedFunctionPrototypes
  2567.     Display*        /* display */,
  2568.     Drawable        /* d */,
  2569.     GC            /* gc */,
  2570.     int            /* x */,
  2571.     int            /* y */,
  2572.     unsigned int    /* width */,
  2573.     unsigned int    /* height */,
  2574.     int            /* angle1 */,
  2575.     int            /* angle2 */
  2576. #endif
  2577. );
  2578.  
  2579. extern void XFillArcs(
  2580. #if NeedFunctionPrototypes
  2581.     Display*        /* display */,
  2582.     Drawable        /* d */,
  2583.     GC            /* gc */,
  2584.     XArc*        /* arcs */,
  2585.     int            /* narcs */
  2586. #endif
  2587. );
  2588.  
  2589. extern void XFillPolygon(
  2590. #if NeedFunctionPrototypes
  2591.     Display*        /* display */,
  2592.     Drawable        /* d */,
  2593.     GC            /* gc */,
  2594.     XPoint*        /* points */,
  2595.     int            /* npoints */,
  2596.     int            /* shape */,
  2597.     int            /* mode */
  2598. #endif
  2599. );
  2600.  
  2601. extern void XFillRectangle(
  2602. #if NeedFunctionPrototypes
  2603.     Display*        /* display */,
  2604.     Drawable        /* d */,
  2605.     GC            /* gc */,
  2606.     int            /* x */,
  2607.     int            /* y */,
  2608.     unsigned int    /* width */,
  2609.     unsigned int    /* height */
  2610. #endif
  2611. );
  2612.  
  2613. extern void XFillRectangles(
  2614. #if NeedFunctionPrototypes
  2615.     Display*        /* display */,
  2616.     Drawable        /* d */,
  2617.     GC            /* gc */,
  2618.     XRectangle*        /* rectangles */,
  2619.     int            /* nrectangles */
  2620. #endif
  2621. );
  2622.  
  2623. extern void XFlush(
  2624. #if NeedFunctionPrototypes
  2625.     Display*        /* display */
  2626. #endif
  2627. );
  2628.  
  2629. extern void XForceScreenSaver(
  2630. #if NeedFunctionPrototypes
  2631.     Display*        /* display */,
  2632.     int            /* mode */
  2633. #endif
  2634. );
  2635.  
  2636. extern void XFree(
  2637. #if NeedFunctionPrototypes
  2638.     void*        /* data */
  2639. #endif
  2640. );
  2641.  
  2642. extern void XFreeColormap(
  2643. #if NeedFunctionPrototypes
  2644.     Display*        /* display */,
  2645.     Colormap        /* colormap */
  2646. #endif
  2647. );
  2648.  
  2649. extern void XFreeColors(
  2650. #if NeedFunctionPrototypes
  2651.     Display*        /* display */,
  2652.     Colormap        /* colormap */,
  2653.     unsigned long*    /* pixels */,
  2654.     int            /* npixels */,
  2655.     unsigned long    /* planes */
  2656. #endif
  2657. );
  2658.  
  2659. extern void XFreeCursor(
  2660. #if NeedFunctionPrototypes
  2661.     Display*        /* display */,
  2662.     Cursor        /* cursor */
  2663. #endif
  2664. );
  2665.  
  2666. extern void XFreeExtensionList(
  2667. #if NeedFunctionPrototypes
  2668.     char**        /* list */    
  2669. #endif
  2670. );
  2671.  
  2672. extern void XFreeFont(
  2673. #if NeedFunctionPrototypes
  2674.     Display*        /* display */,
  2675.     XFontStruct*    /* font_struct */
  2676. #endif
  2677. );
  2678.  
  2679. extern void XFreeFontInfo(
  2680. #if NeedFunctionPrototypes
  2681.     char**        /* names */,
  2682.     XFontStruct*    /* free_info */,
  2683.     int            /* actual_count */
  2684. #endif
  2685. );
  2686.  
  2687. extern void XFreeFontNames(
  2688. #if NeedFunctionPrototypes
  2689.     char**        /* list */
  2690. #endif
  2691. );
  2692.  
  2693. extern void XFreeFontPath(
  2694. #if NeedFunctionPrototypes
  2695.     char**        /* list */
  2696. #endif
  2697. );
  2698.  
  2699. extern void XFreeGC(
  2700. #if NeedFunctionPrototypes
  2701.     Display*        /* display */,
  2702.     GC            /* gc */
  2703. #endif
  2704. );
  2705.  
  2706. extern void XFreeModifiermap(
  2707. #if NeedFunctionPrototypes
  2708.     XModifierKeymap*    /* modmap */
  2709. #endif
  2710. );
  2711.  
  2712. extern void XFreePixmap(
  2713. #if NeedFunctionPrototypes
  2714.     Display*        /* display */,
  2715.     Pixmap        /* pixmap */
  2716. #endif
  2717. );
  2718.  
  2719. extern int XGeometry(
  2720. #if NeedFunctionPrototypes
  2721.     Display*        /* display */,
  2722.     int            /* screen */,
  2723.     _Xconst char*    /* position */,
  2724.     _Xconst char*    /* default_position */,
  2725.     unsigned int    /* bwidth */,
  2726.     unsigned int    /* fwidth */,
  2727.     unsigned int    /* fheight */,
  2728.     int            /* xadder */,
  2729.     int            /* yadder */,
  2730.     int*        /* x_return */,
  2731.     int*        /* y_return */,
  2732.     int*        /* width_return */,
  2733.     int*        /* height_return */
  2734. #endif
  2735. );
  2736.  
  2737. extern void XGetErrorDatabaseText(
  2738. #if NeedFunctionPrototypes
  2739.     Display*        /* display */,
  2740.     _Xconst char*    /* name */,
  2741.     _Xconst char*    /* message */,
  2742.     _Xconst char*    /* default_string */,
  2743.     char*        /* buffer_return */,
  2744.     int            /* length */
  2745. #endif
  2746. );
  2747.  
  2748. extern void XGetErrorText(
  2749. #if NeedFunctionPrototypes
  2750.     Display*        /* display */,
  2751.     int            /* code */,
  2752.     char*        /* buffer_return */,
  2753.     int            /* length */
  2754. #endif
  2755. );
  2756.  
  2757. extern Bool XGetFontProperty(
  2758. #if NeedFunctionPrototypes
  2759.     XFontStruct*    /* font_struct */,
  2760.     Atom        /* atom */,
  2761.     unsigned long*    /* value_return */
  2762. #endif
  2763. );
  2764.  
  2765. extern Status XGetGCValues(
  2766. #if NeedFunctionPrototypes
  2767.     Display*        /* display */,
  2768.     GC            /* gc */,
  2769.     unsigned long    /* valuemask */,
  2770.     XGCValues*        /* values_return */
  2771. #endif
  2772. );
  2773.  
  2774. extern Status XGetGeometry(
  2775. #if NeedFunctionPrototypes
  2776.     Display*        /* display */,
  2777.     Drawable        /* d */,
  2778.     Window*        /* root_return */,
  2779.     int*        /* x_return */,
  2780.     int*        /* y_return */,
  2781.     unsigned int*    /* width_return */,
  2782.     unsigned int*    /* height_return */,
  2783.     unsigned int*    /* border_width_return */,
  2784.     unsigned int*    /* depth_return */
  2785. #endif
  2786. );
  2787.  
  2788. extern Status XGetIconName(
  2789. #if NeedFunctionPrototypes
  2790.     Display*        /* display */,
  2791.     Window        /* w */,
  2792.     char**        /* icon_name_return */
  2793. #endif
  2794. );
  2795.  
  2796. extern void XGetInputFocus(
  2797. #if NeedFunctionPrototypes
  2798.     Display*        /* display */,
  2799.     Window*        /* focus_return */,
  2800.     int*        /* revert_to_return */
  2801. #endif
  2802. );
  2803.  
  2804. extern void XGetKeyboardControl(
  2805. #if NeedFunctionPrototypes
  2806.     Display*        /* display */,
  2807.     XKeyboardState*    /* values_return */
  2808. #endif
  2809. );
  2810.  
  2811. extern void XGetPointerControl(
  2812. #if NeedFunctionPrototypes
  2813.     Display*        /* display */,
  2814.     int*        /* accel_numerator_return */,
  2815.     int*        /* accel_denominator_return */,
  2816.     int*        /* threshold_return */
  2817. #endif
  2818. );
  2819.  
  2820. extern int XGetPointerMapping(
  2821. #if NeedFunctionPrototypes
  2822.     Display*        /* display */,
  2823.     unsigned char*    /* map_return */,
  2824.     int            /* nmap */
  2825. #endif
  2826. );
  2827.  
  2828. extern void XGetScreenSaver(
  2829. #if NeedFunctionPrototypes
  2830.     Display*        /* display */,
  2831.     int*        /* timeout_return */,
  2832.     int*        /* interval_return */,
  2833.     int*        /* prefer_blanking_return */,
  2834.     int*        /* allow_exposures_return */
  2835. #endif
  2836. );
  2837.  
  2838. extern Status XGetTransientForHint(
  2839. #if NeedFunctionPrototypes
  2840.     Display*        /* display */,
  2841.     Window        /* w */,
  2842.     Window*        /* prop_window_return */
  2843. #endif
  2844. );
  2845.  
  2846. extern int XGetWindowProperty(
  2847. #if NeedFunctionPrototypes
  2848.     Display*        /* display */,
  2849.     Window        /* w */,
  2850.     Atom        /* property */,
  2851.     long        /* long_offset */,
  2852.     long        /* long_length */,
  2853.     Bool        /* delete */,
  2854.     Atom        /* req_type */,
  2855.     Atom*        /* actual_type_return */,
  2856.     int*        /* actual_format_return */,
  2857.     unsigned long*    /* nitems_return */,
  2858.     unsigned long*    /* bytes_after_return */,
  2859.     unsigned char**    /* prop_return */
  2860. #endif
  2861. );
  2862.  
  2863. extern Status XGetWindowAttributes(
  2864. #if NeedFunctionPrototypes
  2865.     Display*        /* display */,
  2866.     Window        /* w */,
  2867.     XWindowAttributes*    /* window_attributes_return */
  2868. #endif
  2869. );
  2870.  
  2871. extern void XGrabButton(
  2872. #if NeedFunctionPrototypes
  2873.     Display*        /* display */,
  2874.     unsigned int    /* button */,
  2875.     unsigned int    /* modifiers */,
  2876.     Window        /* grab_window */,
  2877.     Bool        /* owner_events */,
  2878.     unsigned int    /* event_mask */,
  2879.     int            /* pointer_mode */,
  2880.     int            /* keyboard_mode */,
  2881.     Window        /* confine_to */,
  2882.     Cursor        /* cursor */
  2883. #endif
  2884. );
  2885.  
  2886. extern void XGrabKey(
  2887. #if NeedFunctionPrototypes
  2888.     Display*        /* display */,
  2889.     int            /* keycode */,
  2890.     unsigned int    /* modifiers */,
  2891.     Window        /* grab_window */,
  2892.     Bool        /* owner_events */,
  2893.     int            /* pointer_mode */,
  2894.     int            /* keyboard_mode */
  2895. #endif
  2896. );
  2897.  
  2898. extern int XGrabKeyboard(
  2899. #if NeedFunctionPrototypes
  2900.     Display*        /* display */,
  2901.     Window        /* grab_window */,
  2902.     Bool        /* owner_events */,
  2903.     int            /* pointer_mode */,
  2904.     int            /* keyboard_mode */,
  2905.     Time        /* time */
  2906. #endif
  2907. );
  2908.  
  2909. extern int XGrabPointer(
  2910. #if NeedFunctionPrototypes
  2911.     Display*        /* display */,
  2912.     Window        /* grab_window */,
  2913.     Bool        /* owner_events */,
  2914.     unsigned int    /* event_mask */,
  2915.     int            /* pointer_mode */,
  2916.     int            /* keyboard_mode */,
  2917.     Window        /* confine_to */,
  2918.     Cursor        /* cursor */,
  2919.     Time        /* time */
  2920. #endif
  2921. );
  2922.  
  2923. extern void XGrabServer(
  2924. #if NeedFunctionPrototypes
  2925.     Display*        /* display */
  2926. #endif
  2927. );
  2928.  
  2929. extern int XHeightMMOfScreen(
  2930. #if NeedFunctionPrototypes
  2931.     Screen*        /* screen */
  2932. #endif
  2933. );
  2934.  
  2935. extern int XHeightOfScreen(
  2936. #if NeedFunctionPrototypes
  2937.     Screen*        /* screen */
  2938. #endif
  2939. );
  2940.  
  2941. extern void XIfEvent(
  2942. #if NeedFunctionPrototypes
  2943.     Display*        /* display */,
  2944.     XEvent*        /* event_return */,
  2945.     Bool (*) (
  2946. #if NeedNestedPrototypes
  2947.            Display*            /* display */,
  2948.                XEvent*            /* event */,
  2949.                XPointer            /* arg */
  2950. #endif
  2951.              )        /* predicate */,
  2952.     XPointer        /* arg */
  2953. #endif
  2954. );
  2955.  
  2956. extern int XImageByteOrder(
  2957. #if NeedFunctionPrototypes
  2958.     Display*        /* display */
  2959. #endif
  2960. );
  2961.  
  2962. extern void XInstallColormap(
  2963. #if NeedFunctionPrototypes
  2964.     Display*        /* display */,
  2965.     Colormap        /* colormap */
  2966. #endif
  2967. );
  2968.  
  2969. extern KeyCode XKeysymToKeycode(
  2970. #if NeedFunctionPrototypes
  2971.     Display*        /* display */,
  2972.     KeySym        /* keysym */
  2973. #endif
  2974. );
  2975.  
  2976. extern void XKillClient(
  2977. #if NeedFunctionPrototypes
  2978.     Display*        /* display */,
  2979.     XID            /* resource */
  2980. #endif
  2981. );
  2982.  
  2983. extern unsigned long XLastKnownRequestProcessed(
  2984. #if NeedFunctionPrototypes
  2985.     Display*        /* display */
  2986. #endif
  2987. );
  2988.  
  2989. extern Status XLookupColor(
  2990. #if NeedFunctionPrototypes
  2991.     Display*        /* display */,
  2992.     Colormap        /* colormap */,
  2993.     _Xconst char*    /* color_name */,
  2994.     XColor*        /* exact_def_return */,
  2995.     XColor*        /* screen_def_return */
  2996. #endif
  2997. );
  2998.  
  2999. extern void XLowerWindow(
  3000. #if NeedFunctionPrototypes
  3001.     Display*        /* display */,
  3002.     Window        /* w */
  3003. #endif
  3004. );
  3005.  
  3006. extern void XMapRaised(
  3007. #if NeedFunctionPrototypes
  3008.     Display*        /* display */,
  3009.     Window        /* w */
  3010. #endif
  3011. );
  3012.  
  3013. extern void XMapSubwindows(
  3014. #if NeedFunctionPrototypes
  3015.     Display*        /* display */,
  3016.     Window        /* w */
  3017. #endif
  3018. );
  3019.  
  3020. extern void XMapWindow(
  3021. #if NeedFunctionPrototypes
  3022.     Display*        /* display */,
  3023.     Window        /* w */
  3024. #endif
  3025. );
  3026.  
  3027. extern void XMaskEvent(
  3028. #if NeedFunctionPrototypes
  3029.     Display*        /* display */,
  3030.     long        /* event_mask */,
  3031.     XEvent*        /* event_return */
  3032. #endif
  3033. );
  3034.  
  3035. extern int XMaxCmapsOfScreen(
  3036. #if NeedFunctionPrototypes
  3037.     Screen*        /* screen */
  3038. #endif
  3039. );
  3040.  
  3041. extern int XMinCmapsOfScreen(
  3042. #if NeedFunctionPrototypes
  3043.     Screen*        /* screen */
  3044. #endif
  3045. );
  3046.  
  3047. extern void XMoveResizeWindow(
  3048. #if NeedFunctionPrototypes
  3049.     Display*        /* display */,
  3050.     Window        /* w */,
  3051.     int            /* x */,
  3052.     int            /* y */,
  3053.     unsigned int    /* width */,
  3054.     unsigned int    /* height */
  3055. #endif
  3056. );
  3057.  
  3058. extern void XMoveWindow(
  3059. #if NeedFunctionPrototypes
  3060.     Display*        /* display */,
  3061.     Window        /* w */,
  3062.     int            /* x */,
  3063.     int            /* y */
  3064. #endif
  3065. );
  3066.  
  3067. extern void XNextEvent(
  3068. #if NeedFunctionPrototypes
  3069.     Display*        /* display */,
  3070.     XEvent*        /* event_return */
  3071. #endif
  3072. );
  3073.  
  3074. extern void XNoOp(
  3075. #if NeedFunctionPrototypes
  3076.     Display*        /* display */
  3077. #endif
  3078. );
  3079.  
  3080. extern Status XParseColor(
  3081. #if NeedFunctionPrototypes
  3082.     Display*        /* display */,
  3083.     Colormap        /* colormap */,
  3084.     _Xconst char*    /* spec */,
  3085.     XColor*        /* exact_def_return */
  3086. #endif
  3087. );
  3088.  
  3089. extern int XParseGeometry(
  3090. #if NeedFunctionPrototypes
  3091.     _Xconst char*    /* parsestring */,
  3092.     int*        /* x_return */,
  3093.     int*        /* y_return */,
  3094.     unsigned int*    /* width_return */,
  3095.     unsigned int*    /* height_return */
  3096. #endif
  3097. );
  3098.  
  3099. extern void XPeekEvent(
  3100. #if NeedFunctionPrototypes
  3101.     Display*        /* display */,
  3102.     XEvent*        /* event_return */
  3103. #endif
  3104. );
  3105.  
  3106. extern void XPeekIfEvent(
  3107. #if NeedFunctionPrototypes
  3108.     Display*        /* display */,
  3109.     XEvent*        /* event_return */,
  3110.     Bool (*) (
  3111. #if NeedNestedPrototypes
  3112.            Display*        /* display */,
  3113.                XEvent*        /* event */,
  3114.                XPointer        /* arg */
  3115. #endif
  3116.              )        /* predicate */,
  3117.     XPointer        /* arg */
  3118. #endif
  3119. );
  3120.  
  3121. extern int XPending(
  3122. #if NeedFunctionPrototypes
  3123.     Display*        /* display */
  3124. #endif
  3125. );
  3126.  
  3127. extern int XPlanesOfScreen(
  3128. #if NeedFunctionPrototypes
  3129.     Screen*        /* screen */
  3130.     
  3131. #endif
  3132. );
  3133.  
  3134. extern int XProtocolRevision(
  3135. #if NeedFunctionPrototypes
  3136.     Display*        /* display */
  3137. #endif
  3138. );
  3139.  
  3140. extern int XProtocolVersion(
  3141. #if NeedFunctionPrototypes
  3142.     Display*        /* display */
  3143. #endif
  3144. );
  3145.  
  3146.  
  3147. extern void XPutBackEvent(
  3148. #if NeedFunctionPrototypes
  3149.     Display*        /* display */,
  3150.     XEvent*        /* event */
  3151. #endif
  3152. );
  3153.  
  3154. extern void XPutImage(
  3155. #if NeedFunctionPrototypes
  3156.     Display*        /* display */,
  3157.     Drawable        /* d */,
  3158.     GC            /* gc */,
  3159.     XImage*        /* image */,
  3160.     int            /* src_x */,
  3161.     int            /* src_y */,
  3162.     int            /* dest_x */,
  3163.     int            /* dest_y */,
  3164.     unsigned int    /* width */,
  3165.     unsigned int    /* height */      
  3166. #endif
  3167. );
  3168.  
  3169. extern int XQLength(
  3170. #if NeedFunctionPrototypes
  3171.     Display*        /* display */
  3172. #endif
  3173. );
  3174.  
  3175. extern Status XQueryBestCursor(
  3176. #if NeedFunctionPrototypes
  3177.     Display*        /* display */,
  3178.     Drawable        /* d */,
  3179.     unsigned int        /* width */,
  3180.     unsigned int    /* height */,
  3181.     unsigned int*    /* width_return */,
  3182.     unsigned int*    /* height_return */
  3183. #endif
  3184. );
  3185.  
  3186. extern Status XQueryBestSize(
  3187. #if NeedFunctionPrototypes
  3188.     Display*        /* display */,
  3189.     int            /* class */,
  3190.     Drawable        /* which_screen */,
  3191.     unsigned int    /* width */,
  3192.     unsigned int    /* height */,
  3193.     unsigned int*    /* width_return */,
  3194.     unsigned int*    /* height_return */
  3195. #endif
  3196. );
  3197.  
  3198. extern Status XQueryBestStipple(
  3199. #if NeedFunctionPrototypes
  3200.     Display*        /* display */,
  3201.     Drawable        /* which_screen */,
  3202.     unsigned int    /* width */,
  3203.     unsigned int    /* height */,
  3204.     unsigned int*    /* width_return */,
  3205.     unsigned int*    /* height_return */
  3206. #endif
  3207. );
  3208.  
  3209. extern Status XQueryBestTile(
  3210. #if NeedFunctionPrototypes
  3211.     Display*        /* display */,
  3212.     Drawable        /* which_screen */,
  3213.     unsigned int    /* width */,
  3214.     unsigned int    /* height */,
  3215.     unsigned int*    /* width_return */,
  3216.     unsigned int*    /* height_return */
  3217. #endif
  3218. );
  3219.  
  3220. extern void XQueryColor(
  3221. #if NeedFunctionPrototypes
  3222.     Display*        /* display */,
  3223.     Colormap        /* colormap */,
  3224.     XColor*        /* def_in_out */
  3225. #endif
  3226. );
  3227.  
  3228. extern void XQueryColors(
  3229. #if NeedFunctionPrototypes
  3230.     Display*        /* display */,
  3231.     Colormap        /* colormap */,
  3232.     XColor*        /* defs_in_out */,
  3233.     int            /* ncolors */
  3234. #endif
  3235. );
  3236.  
  3237. extern Bool XQueryExtension(
  3238. #if NeedFunctionPrototypes
  3239.     Display*        /* display */,
  3240.     _Xconst char*    /* name */,
  3241.     int*        /* major_opcode_return */,
  3242.     int*        /* first_event_return */,
  3243.     int*        /* first_error_return */
  3244. #endif
  3245. );
  3246.  
  3247. extern void XQueryKeymap(
  3248. #if NeedFunctionPrototypes
  3249.     Display*        /* display */,
  3250.     char [32]        /* keys_return */
  3251. #endif
  3252. );
  3253.  
  3254. extern Bool XQueryPointer(
  3255. #if NeedFunctionPrototypes
  3256.     Display*        /* display */,
  3257.     Window        /* w */,
  3258.     Window*        /* root_return */,
  3259.     Window*        /* child_return */,
  3260.     int*        /* root_x_return */,
  3261.     int*        /* root_y_return */,
  3262.     int*        /* win_x_return */,
  3263.     int*        /* win_y_return */,
  3264.     unsigned int*       /* mask_return */
  3265. #endif
  3266. );
  3267.  
  3268. extern void XQueryTextExtents(
  3269. #if NeedFunctionPrototypes
  3270.     Display*        /* display */,
  3271.     XID            /* font_ID */,
  3272.     _Xconst char*    /* string */,
  3273.     int            /* nchars */,
  3274.     int*        /* direction_return */,
  3275.     int*        /* font_ascent_return */,
  3276.     int*        /* font_descent_return */,
  3277.     XCharStruct*    /* overall_return */    
  3278. #endif
  3279. );
  3280.  
  3281. extern void XQueryTextExtents16(
  3282. #if NeedFunctionPrototypes
  3283.     Display*        /* display */,
  3284.     XID            /* font_ID */,
  3285.     _Xconst XChar2b*    /* string */,
  3286.     int            /* nchars */,
  3287.     int*        /* direction_return */,
  3288.     int*        /* font_ascent_return */,
  3289.     int*        /* font_descent_return */,
  3290.     XCharStruct*    /* overall_return */
  3291. #endif
  3292. );
  3293.  
  3294. extern Status XQueryTree(
  3295. #if NeedFunctionPrototypes
  3296.     Display*        /* display */,
  3297.     Window        /* w */,
  3298.     Window*        /* root_return */,
  3299.     Window*        /* parent_return */,
  3300.     Window**        /* children_return */,
  3301.     unsigned int*    /* nchildren_return */
  3302. #endif
  3303. );
  3304.  
  3305. extern void XRaiseWindow(
  3306. #if NeedFunctionPrototypes
  3307.     Display*        /* display */,
  3308.     Window        /* w */
  3309. #endif
  3310. );
  3311.  
  3312. extern int XReadBitmapFile(
  3313. #if NeedFunctionPrototypes
  3314.     Display*        /* display */,
  3315.     Drawable         /* d */,
  3316.     _Xconst char*    /* filename */,
  3317.     unsigned int*    /* width_return */,
  3318.     unsigned int*    /* height_return */,
  3319.     Pixmap*        /* bitmap_return */,
  3320.     int*        /* x_hot_return */,
  3321.     int*        /* y_hot_return */
  3322. #endif
  3323. );
  3324.  
  3325. extern void XRebindKeysym(
  3326. #if NeedFunctionPrototypes
  3327.     Display*        /* display */,
  3328.     KeySym        /* keysym */,
  3329.     KeySym*        /* list */,
  3330.     int            /* mod_count */,
  3331.     _Xconst unsigned char*    /* string */,
  3332.     int            /* bytes_string */
  3333. #endif
  3334. );
  3335.  
  3336. extern void XRecolorCursor(
  3337. #if NeedFunctionPrototypes
  3338.     Display*        /* display */,
  3339.     Cursor        /* cursor */,
  3340.     XColor*        /* foreground_color */,
  3341.     XColor*        /* background_color */
  3342. #endif
  3343. );
  3344.  
  3345. extern void XRefreshKeyboardMapping(
  3346. #if NeedFunctionPrototypes
  3347.     XMappingEvent*    /* event_map */    
  3348. #endif
  3349. );
  3350.  
  3351. extern void XRemoveFromSaveSet(
  3352. #if NeedFunctionPrototypes
  3353.     Display*        /* display */,
  3354.     Window        /* w */
  3355. #endif
  3356. );
  3357.  
  3358. extern void XRemoveHost(
  3359. #if NeedFunctionPrototypes
  3360.     Display*        /* display */,
  3361.     XHostAddress*    /* host */
  3362. #endif
  3363. );
  3364.  
  3365. extern void XRemoveHosts(
  3366. #if NeedFunctionPrototypes
  3367.     Display*        /* display */,
  3368.     XHostAddress*    /* hosts */,
  3369.     int            /* num_hosts */
  3370. #endif
  3371. );
  3372.  
  3373. extern void XReparentWindow(
  3374. #if NeedFunctionPrototypes
  3375.     Display*        /* display */,
  3376.     Window        /* w */,
  3377.     Window        /* parent */,
  3378.     int            /* x */,
  3379.     int            /* y */
  3380. #endif
  3381. );
  3382.  
  3383. extern void XResetScreenSaver(
  3384. #if NeedFunctionPrototypes
  3385.     Display*        /* display */
  3386. #endif
  3387. );
  3388.  
  3389. extern void XResizeWindow(
  3390. #if NeedFunctionPrototypes
  3391.     Display*        /* display */,
  3392.     Window        /* w */,
  3393.     unsigned int    /* width */,
  3394.     unsigned int    /* height */
  3395. #endif
  3396. );
  3397.  
  3398. extern void XRestackWindows(
  3399. #if NeedFunctionPrototypes
  3400.     Display*        /* display */,
  3401.     Window*        /* windows */,
  3402.     int            /* nwindows */
  3403. #endif
  3404. );
  3405.  
  3406. extern void XRotateBuffers(
  3407. #if NeedFunctionPrototypes
  3408.     Display*        /* display */,
  3409.     int            /* rotate */
  3410. #endif
  3411. );
  3412.  
  3413. extern void XRotateWindowProperties(
  3414. #if NeedFunctionPrototypes
  3415.     Display*        /* display */,
  3416.     Window        /* w */,
  3417.     Atom*        /* properties */,
  3418.     int            /* num_prop */,
  3419.     int            /* npositions */
  3420. #endif
  3421. );
  3422.  
  3423. extern int XScreenCount(
  3424. #if NeedFunctionPrototypes
  3425.     Display*        /* display */
  3426. #endif
  3427. );
  3428.  
  3429. extern void XSelectInput(
  3430. #if NeedFunctionPrototypes
  3431.     Display*        /* display */,
  3432.     Window        /* w */,
  3433.     long        /* event_mask */
  3434. #endif
  3435. );
  3436.  
  3437. extern Status XSendEvent(
  3438. #if NeedFunctionPrototypes
  3439.     Display*        /* display */,
  3440.     Window        /* w */,
  3441.     Bool        /* propagate */,
  3442.     long        /* event_mask */,
  3443.     XEvent*        /* event_send */
  3444. #endif
  3445. );
  3446.  
  3447. extern void XSetAccessControl(
  3448. #if NeedFunctionPrototypes
  3449.     Display*        /* display */,
  3450.     int            /* mode */
  3451. #endif
  3452. );
  3453.  
  3454. extern void XSetArcMode(
  3455. #if NeedFunctionPrototypes
  3456.     Display*        /* display */,
  3457.     GC            /* gc */,
  3458.     int            /* arc_mode */
  3459. #endif
  3460. );
  3461.  
  3462. extern void XSetBackground(
  3463. #if NeedFunctionPrototypes
  3464.     Display*        /* display */,
  3465.     GC            /* gc */,
  3466.     unsigned long    /* background */
  3467. #endif
  3468. );
  3469.  
  3470. extern void XSetClipMask(
  3471. #if NeedFunctionPrototypes
  3472.     Display*        /* display */,
  3473.     GC            /* gc */,
  3474.     Pixmap        /* pixmap */
  3475. #endif
  3476. );
  3477.  
  3478. extern void XSetClipOrigin(
  3479. #if NeedFunctionPrototypes
  3480.     Display*        /* display */,
  3481.     GC            /* gc */,
  3482.     int            /* clip_x_origin */,
  3483.     int            /* clip_y_origin */
  3484. #endif
  3485. );
  3486.  
  3487. extern void XSetClipRectangles(
  3488. #if NeedFunctionPrototypes
  3489.     Display*        /* display */,
  3490.     GC            /* gc */,
  3491.     int            /* clip_x_origin */,
  3492.     int            /* clip_y_origin */,
  3493.     XRectangle*        /* rectangles */,
  3494.     int            /* n */,
  3495.     int            /* ordering */
  3496. #endif
  3497. );
  3498.  
  3499. extern void XSetCloseDownMode(
  3500. #if NeedFunctionPrototypes
  3501.     Display*        /* display */,
  3502.     int            /* close_mode */
  3503. #endif
  3504. );
  3505.  
  3506. extern void XSetCommand(
  3507. #if NeedFunctionPrototypes
  3508.     Display*        /* display */,
  3509.     Window        /* w */,
  3510.     char**        /* argv */,
  3511.     int            /* argc */
  3512. #endif
  3513. );
  3514.  
  3515. extern void XSetDashes(
  3516. #if NeedFunctionPrototypes
  3517.     Display*        /* display */,
  3518.     GC            /* gc */,
  3519.     int            /* dash_offset */,
  3520.     _Xconst char*    /* dash_list */,
  3521.     int            /* n */
  3522. #endif
  3523. );
  3524.  
  3525. extern void XSetFillRule(
  3526. #if NeedFunctionPrototypes
  3527.     Display*        /* display */,
  3528.     GC            /* gc */,
  3529.     int            /* fill_rule */
  3530. #endif
  3531. );
  3532.  
  3533. extern void XSetFillStyle(
  3534. #if NeedFunctionPrototypes
  3535.     Display*        /* display */,
  3536.     GC            /* gc */,
  3537.     int            /* fill_style */
  3538. #endif
  3539. );
  3540.  
  3541. extern void XSetFont(
  3542. #if NeedFunctionPrototypes
  3543.     Display*        /* display */,
  3544.     GC            /* gc */,
  3545.     Font        /* font */
  3546. #endif
  3547. );
  3548.  
  3549. extern void XSetFontPath(
  3550. #if NeedFunctionPrototypes
  3551.     Display*        /* display */,
  3552.     char**        /* directories */,
  3553.     int            /* ndirs */         
  3554. #endif
  3555. );
  3556.  
  3557. extern void XSetForeground(
  3558. #if NeedFunctionPrototypes
  3559.     Display*        /* display */,
  3560.     GC            /* gc */,
  3561.     unsigned long    /* foreground */
  3562. #endif
  3563. );
  3564.  
  3565. extern void XSetFunction(
  3566. #if NeedFunctionPrototypes
  3567.     Display*        /* display */,
  3568.     GC            /* gc */,
  3569.     int            /* function */
  3570. #endif
  3571. );
  3572.  
  3573. extern void XSetGraphicsExposures(
  3574. #if NeedFunctionPrototypes
  3575.     Display*        /* display */,
  3576.     GC            /* gc */,
  3577.     Bool        /* graphics_exposures */
  3578. #endif
  3579. );
  3580.  
  3581. extern void XSetIconName(
  3582. #if NeedFunctionPrototypes
  3583.     Display*        /* display */,
  3584.     Window        /* w */,
  3585.     _Xconst char*    /* icon_name */
  3586. #endif
  3587. );
  3588.  
  3589. extern void XSetInputFocus(
  3590. #if NeedFunctionPrototypes
  3591.     Display*        /* display */,
  3592.     Window        /* focus */,
  3593.     int            /* revert_to */,
  3594.     Time        /* time */
  3595. #endif
  3596. );
  3597.  
  3598. extern void XSetLineAttributes(
  3599. #if NeedFunctionPrototypes
  3600.     Display*        /* display */,
  3601.     GC            /* gc */,
  3602.     unsigned int    /* line_width */,
  3603.     int            /* line_style */,
  3604.     int            /* cap_style */,
  3605.     int            /* join_style */
  3606. #endif
  3607. );
  3608.  
  3609. extern int XSetModifierMapping(
  3610. #if NeedFunctionPrototypes
  3611.     Display*        /* display */,
  3612.     XModifierKeymap*    /* modmap */
  3613. #endif
  3614. );
  3615.  
  3616. extern void XSetPlaneMask(
  3617. #if NeedFunctionPrototypes
  3618.     Display*        /* display */,
  3619.     GC            /* gc */,
  3620.     unsigned long    /* plane_mask */
  3621. #endif
  3622. );
  3623.  
  3624. extern int XSetPointerMapping(
  3625. #if NeedFunctionPrototypes
  3626.     Display*        /* display */,
  3627.     _Xconst unsigned char*    /* map */,
  3628.     int            /* nmap */
  3629. #endif
  3630. );
  3631.  
  3632. extern void XSetScreenSaver(
  3633. #if NeedFunctionPrototypes
  3634.     Display*        /* display */,
  3635.     int            /* timeout */,
  3636.     int            /* interval */,
  3637.     int            /* prefer_blanking */,
  3638.     int            /* allow_exposures */
  3639. #endif
  3640. );
  3641.  
  3642. extern void XSetSelectionOwner(
  3643. #if NeedFunctionPrototypes
  3644.     Display*        /* display */,
  3645.     Atom            /* selection */,
  3646.     Window        /* owner */,
  3647.     Time        /* time */
  3648. #endif
  3649. );
  3650.  
  3651. extern void XSetState(
  3652. #if NeedFunctionPrototypes
  3653.     Display*        /* display */,
  3654.     GC            /* gc */,
  3655.     unsigned long     /* foreground */,
  3656.     unsigned long    /* background */,
  3657.     int            /* function */,
  3658.     unsigned long    /* plane_mask */
  3659. #endif
  3660. );
  3661.  
  3662. extern void XSetStipple(
  3663. #if NeedFunctionPrototypes
  3664.     Display*        /* display */,
  3665.     GC            /* gc */,
  3666.     Pixmap        /* stipple */
  3667. #endif
  3668. );
  3669.  
  3670. extern void XSetSubwindowMode(
  3671. #if NeedFunctionPrototypes
  3672.     Display*        /* display */,
  3673.     GC            /* gc */,
  3674.     int            /* subwindow_mode */
  3675. #endif
  3676. );
  3677.  
  3678. extern void XSetTSOrigin(
  3679. #if NeedFunctionPrototypes
  3680.     Display*        /* display */,
  3681.     GC            /* gc */,
  3682.     int            /* ts_x_origin */,
  3683.     int            /* ts_y_origin */
  3684. #endif
  3685. );
  3686.  
  3687. extern void XSetTile(
  3688. #if NeedFunctionPrototypes
  3689.     Display*        /* display */,
  3690.     GC            /* gc */,
  3691.     Pixmap        /* tile */
  3692. #endif
  3693. );
  3694.  
  3695. extern void XSetWindowBackground(
  3696. #if NeedFunctionPrototypes
  3697.     Display*        /* display */,
  3698.     Window        /* w */,
  3699.     unsigned long    /* background_pixel */
  3700. #endif
  3701. );
  3702.  
  3703. extern void XSetWindowBackgroundPixmap(
  3704. #if NeedFunctionPrototypes
  3705.     Display*        /* display */,
  3706.     Window        /* w */,
  3707.     Pixmap        /* background_pixmap */
  3708. #endif
  3709. );
  3710.  
  3711. extern void XSetWindowBorder(
  3712. #if NeedFunctionPrototypes
  3713.     Display*        /* display */,
  3714.     Window        /* w */,
  3715.     unsigned long    /* border_pixel */
  3716. #endif
  3717. );
  3718.  
  3719. extern void XSetWindowBorderPixmap(
  3720. #if NeedFunctionPrototypes
  3721.     Display*        /* display */,
  3722.     Window        /* w */,
  3723.     Pixmap        /* border_pixmap */
  3724. #endif
  3725. );
  3726.  
  3727. extern void XSetWindowBorderWidth(
  3728. #if NeedFunctionPrototypes
  3729.     Display*        /* display */,
  3730.     Window        /* w */,
  3731.     unsigned int    /* width */
  3732. #endif
  3733. );
  3734.  
  3735. extern void XSetWindowColormap(
  3736. #if NeedFunctionPrototypes
  3737.     Display*        /* display */,
  3738.     Window        /* w */,
  3739.     Colormap        /* colormap */
  3740. #endif
  3741. );
  3742.  
  3743. extern void XStoreBuffer(
  3744. #if NeedFunctionPrototypes
  3745.     Display*        /* display */,
  3746.     _Xconst char*    /* bytes */,
  3747.     int            /* nbytes */,
  3748.     int            /* buffer */
  3749. #endif
  3750. );
  3751.  
  3752. extern void XStoreBytes(
  3753. #if NeedFunctionPrototypes
  3754.     Display*        /* display */,
  3755.     _Xconst char*    /* bytes */,
  3756.     int            /* nbytes */
  3757. #endif
  3758. );
  3759.  
  3760. extern void XStoreColor(
  3761. #if NeedFunctionPrototypes
  3762.     Display*        /* display */,
  3763.     Colormap        /* colormap */,
  3764.     XColor*        /* color */
  3765. #endif
  3766. );
  3767.  
  3768. extern void XStoreColors(
  3769. #if NeedFunctionPrototypes
  3770.     Display*        /* display */,
  3771.     Colormap        /* colormap */,
  3772.     XColor*        /* color */,
  3773.     int            /* ncolors */
  3774. #endif
  3775. );
  3776.  
  3777. extern void XStoreName(
  3778. #if NeedFunctionPrototypes
  3779.     Display*        /* display */,
  3780.     Window        /* w */,
  3781.     _Xconst char*    /* window_name */
  3782. #endif
  3783. );
  3784.  
  3785. extern void XStoreNamedColor(
  3786. #if NeedFunctionPrototypes
  3787.     Display*        /* display */,
  3788.     Colormap        /* colormap */,
  3789.     _Xconst char*    /* color */,
  3790.     unsigned long    /* pixel */,
  3791.     int            /* flags */
  3792. #endif
  3793. );
  3794.  
  3795. extern void XSync(
  3796. #if NeedFunctionPrototypes
  3797.     Display*        /* display */,
  3798.     Bool        /* discard */
  3799. #endif
  3800. );
  3801.  
  3802. extern void XTextExtents(
  3803. #if NeedFunctionPrototypes
  3804.     XFontStruct*    /* font_struct */,
  3805.     _Xconst char*    /* string */,
  3806.     int            /* nchars */,
  3807.     int*        /* direction_return */,
  3808.     int*        /* font_ascent_return */,
  3809.     int*        /* font_descent_return */,
  3810.     XCharStruct*    /* overall_return */
  3811. #endif
  3812. );
  3813.  
  3814. extern void XTextExtents16(
  3815. #if NeedFunctionPrototypes
  3816.     XFontStruct*    /* font_struct */,
  3817.     _Xconst XChar2b*    /* string */,
  3818.     int            /* nchars */,
  3819.     int*        /* direction_return */,
  3820.     int*        /* font_ascent_return */,
  3821.     int*        /* font_descent_return */,
  3822.     XCharStruct*    /* overall_return */
  3823. #endif
  3824. );
  3825.  
  3826. extern int XTextWidth(
  3827. #if NeedFunctionPrototypes
  3828.     XFontStruct*    /* font_struct */,
  3829.     _Xconst char*    /* string */,
  3830.     int            /* count */
  3831. #endif
  3832. );
  3833.  
  3834. extern int XTextWidth16(
  3835. #if NeedFunctionPrototypes
  3836.     XFontStruct*    /* font_struct */,
  3837.     _Xconst XChar2b*    /* string */,
  3838.     int            /* count */
  3839. #endif
  3840. );
  3841.  
  3842. extern Bool XTranslateCoordinates(
  3843. #if NeedFunctionPrototypes
  3844.     Display*        /* display */,
  3845.     Window        /* src_w */,
  3846.     Window        /* dest_w */,
  3847.     int            /* src_x */,
  3848.     int            /* src_y */,
  3849.     int*        /* dest_x_return */,
  3850.     int*        /* dest_y_return */,
  3851.     Window*        /* child_return */
  3852. #endif
  3853. );
  3854.  
  3855. extern void XUndefineCursor(
  3856. #if NeedFunctionPrototypes
  3857.     Display*        /* display */,
  3858.     Window        /* w */
  3859. #endif
  3860. );
  3861.  
  3862. extern void XUngrabButton(
  3863. #if NeedFunctionPrototypes
  3864.     Display*        /* display */,
  3865.     unsigned int    /* button */,
  3866.     unsigned int    /* modifiers */,
  3867.     Window        /* grab_window */
  3868. #endif
  3869. );
  3870.  
  3871. extern void XUngrabKey(
  3872. #if NeedFunctionPrototypes
  3873.     Display*        /* display */,
  3874.     int            /* keycode */,
  3875.     unsigned int    /* modifiers */,
  3876.     Window        /* grab_window */
  3877. #endif
  3878. );
  3879.  
  3880. extern void XUngrabKeyboard(
  3881. #if NeedFunctionPrototypes
  3882.     Display*        /* display */,
  3883.     Time        /* time */
  3884. #endif
  3885. );
  3886.  
  3887. extern void XUngrabPointer(
  3888. #if NeedFunctionPrototypes
  3889.     Display*        /* display */,
  3890.     Time        /* time */
  3891. #endif
  3892. );
  3893.  
  3894. extern void XUngrabServer(
  3895. #if NeedFunctionPrototypes
  3896.     Display*        /* display */
  3897. #endif
  3898. );
  3899.  
  3900. extern void XUninstallColormap(
  3901. #if NeedFunctionPrototypes
  3902.     Display*        /* display */,
  3903.     Colormap        /* colormap */
  3904. #endif
  3905. );
  3906.  
  3907. extern void XUnloadFont(
  3908. #if NeedFunctionPrototypes
  3909.     Display*        /* display */,
  3910.     Font        /* font */
  3911. #endif
  3912. );
  3913.  
  3914. extern void XUnmapSubwindows(
  3915. #if NeedFunctionPrototypes
  3916.     Display*        /* display */,
  3917.     Window        /* w */
  3918. #endif
  3919. );
  3920.  
  3921. extern void XUnmapWindow(
  3922. #if NeedFunctionPrototypes
  3923.     Display*        /* display */,
  3924.     Window        /* w */
  3925. #endif
  3926. );
  3927.  
  3928. extern int XVendorRelease(
  3929. #if NeedFunctionPrototypes
  3930.     Display*        /* display */
  3931. #endif
  3932. );
  3933.  
  3934. extern void XWarpPointer(
  3935. #if NeedFunctionPrototypes
  3936.     Display*        /* display */,
  3937.     Window        /* src_w */,
  3938.     Window        /* dest_w */,
  3939.     int            /* src_x */,
  3940.     int            /* src_y */,
  3941.     unsigned int    /* src_width */,
  3942.     unsigned int    /* src_height */,
  3943.     int            /* dest_x */,
  3944.     int            /* dest_y */         
  3945. #endif
  3946. );
  3947.  
  3948. extern int XWidthMMOfScreen(
  3949. #if NeedFunctionPrototypes
  3950.     Screen*        /* screen */
  3951. #endif
  3952. );
  3953.  
  3954. extern int XWidthOfScreen(
  3955. #if NeedFunctionPrototypes
  3956.     Screen*        /* screen */
  3957. #endif
  3958. );
  3959.  
  3960. extern void XWindowEvent(
  3961. #if NeedFunctionPrototypes
  3962.     Display*        /* display */,
  3963.     Window        /* w */,
  3964.     long        /* event_mask */,
  3965.     XEvent*        /* event_return */
  3966. #endif
  3967. );
  3968.  
  3969. extern int XWriteBitmapFile(
  3970. #if NeedFunctionPrototypes
  3971.     Display*        /* display */,
  3972.     _Xconst char*    /* filename */,
  3973.     Pixmap        /* bitmap */,
  3974.     unsigned int    /* width */,
  3975.     unsigned int    /* height */,
  3976.     int            /* x_hot */,
  3977.     int            /* y_hot */             
  3978. #endif
  3979. );
  3980.  
  3981. extern Bool XSupportsLocale(
  3982. #if NeedFunctionPrototypes
  3983.     void
  3984. #endif
  3985. );
  3986.  
  3987. extern char *XSetLocaleModifiers(
  3988. #if NeedFunctionPrototypes
  3989.     _Xconst char*    /* modifier_list */
  3990. #endif
  3991. );
  3992.  
  3993. extern XFontSet XCreateFontSet(
  3994. #if NeedFunctionPrototypes
  3995.     Display*        /* display */,
  3996.     _Xconst char*    /* base_font_name_list */,
  3997.     char***        /* missing_charset_list */,
  3998.     int*        /* missing_charset_count */,
  3999.     char**        /* def_string */
  4000. #endif
  4001. );
  4002.  
  4003. extern void XFreeFontSet(
  4004. #if NeedFunctionPrototypes
  4005.     Display*        /* display */,
  4006.     XFontSet        /* font_set */
  4007. #endif
  4008. );
  4009.  
  4010. extern int XFontsOfFontSet(
  4011. #if NeedFunctionPrototypes
  4012.     XFontSet        /* font_set */,
  4013.     XFontStruct***    /* font_struct_list */,
  4014.     char***        /* font_name_list */
  4015. #endif
  4016. );
  4017.  
  4018. extern char *XBaseFontNameListOfFontSet(
  4019. #if NeedFunctionPrototypes
  4020.     XFontSet        /* font_set */
  4021. #endif
  4022. );
  4023.  
  4024. extern char *XLocaleOfFontSet(
  4025. #if NeedFunctionPrototypes
  4026.     XFontSet        /* font_set */
  4027. #endif
  4028. );
  4029.  
  4030. extern Bool XContextDependentDrawing(
  4031. #if NeedFunctionPrototypes
  4032.     XFontSet        /* font_set */
  4033. #endif
  4034. );
  4035.  
  4036. extern XFontSetExtents *XExtentsOfFontSet(
  4037. #if NeedFunctionPrototypes
  4038.     XFontSet        /* font_set */
  4039. #endif
  4040. );
  4041.  
  4042. extern int XmbTextEscapement(
  4043. #if NeedFunctionPrototypes
  4044.     XFontSet        /* font_set */,
  4045.     _Xconst char*    /* text */,
  4046.     int            /* bytes_text */
  4047. #endif
  4048. );
  4049.  
  4050. extern int XwcTextEscapement(
  4051. #if NeedFunctionPrototypes
  4052.     XFontSet        /* font_set */,
  4053.     wchar_t*        /* text */,
  4054.     int            /* num_wchars */
  4055. #endif
  4056. );
  4057.  
  4058. extern int XmbTextExtents(
  4059. #if NeedFunctionPrototypes
  4060.     XFontSet        /* font_set */,
  4061.     _Xconst char*    /* text */,
  4062.     int            /* bytes_text */,
  4063.     XRectangle*        /* overall_ink_return */,
  4064.     XRectangle*        /* overall_logical_return */
  4065. #endif
  4066. );
  4067.  
  4068. extern int XwcTextExtents(
  4069. #if NeedFunctionPrototypes
  4070.     XFontSet        /* font_set */,
  4071.     wchar_t*        /* text */,
  4072.     int            /* num_wchars */,
  4073.     XRectangle*        /* overall_ink_return */,
  4074.     XRectangle*        /* overall_logical_return */
  4075. #endif
  4076. );
  4077.  
  4078. extern Status XmbTextPerCharExtents(
  4079. #if NeedFunctionPrototypes
  4080.     XFontSet        /* font_set */,
  4081.     _Xconst char*    /* text */,
  4082.     int            /* bytes_text */,
  4083.     XRectangle*        /* ink_extents_buffer */,
  4084.     XRectangle*        /* logical_extents_buffer */,
  4085.     int            /* buffer_size */,
  4086.     int*        /* num_chars */,
  4087.     XRectangle*        /* overall_ink_return */,
  4088.     XRectangle*        /* overall_logical_return */
  4089. #endif
  4090. );
  4091.  
  4092. extern Status XwcTextPerCharExtents(
  4093. #if NeedFunctionPrototypes
  4094.     XFontSet        /* font_set */,
  4095.     wchar_t*        /* text */,
  4096.     int            /* num_wchars */,
  4097.     XRectangle*        /* ink_extents_buffer */,
  4098.     XRectangle*        /* logical_extents_buffer */,
  4099.     int            /* buffer_size */,
  4100.     int*        /* num_chars */,
  4101.     XRectangle*        /* overall_ink_return */,
  4102.     XRectangle*        /* overall_logical_return */
  4103. #endif
  4104. );
  4105.  
  4106. extern void XmbDrawText(
  4107. #if NeedFunctionPrototypes
  4108.     Display*        /* display */,
  4109.     Drawable        /* d */,
  4110.     GC            /* gc */,
  4111.     int            /* x */,
  4112.     int            /* y */,
  4113.     XmbTextItem*    /* text_items */,
  4114.     int            /* nitems */
  4115. #endif
  4116. );
  4117.  
  4118. extern void XwcDrawText(
  4119. #if NeedFunctionPrototypes
  4120.     Display*        /* display */,
  4121.     Drawable        /* d */,
  4122.     GC            /* gc */,
  4123.     int            /* x */,
  4124.     int            /* y */,
  4125.     XwcTextItem*    /* text_items */,
  4126.     int            /* nitems */
  4127. #endif
  4128. );
  4129.  
  4130. extern void XmbDrawString(
  4131. #if NeedFunctionPrototypes
  4132.     Display*        /* display */,
  4133.     Drawable        /* d */,
  4134.     XFontSet        /* font_set */,
  4135.     GC            /* gc */,
  4136.     int            /* x */,
  4137.     int            /* y */,
  4138.     _Xconst char*    /* text */,
  4139.     int            /* bytes_text */
  4140. #endif
  4141. );
  4142.  
  4143. extern void XwcDrawString(
  4144. #if NeedFunctionPrototypes
  4145.     Display*        /* display */,
  4146.     Drawable        /* d */,
  4147.     XFontSet        /* font_set */,
  4148.     GC            /* gc */,
  4149.     int            /* x */,
  4150.     int            /* y */,
  4151.     wchar_t*        /* text */,
  4152.     int            /* num_wchars */
  4153. #endif
  4154. );
  4155.  
  4156. extern void XmbDrawImageString(
  4157. #if NeedFunctionPrototypes
  4158.     Display*        /* display */,
  4159.     Drawable        /* d */,
  4160.     XFontSet        /* font_set */,
  4161.     GC            /* gc */,
  4162.     int            /* x */,
  4163.     int            /* y */,
  4164.     _Xconst char*    /* text */,
  4165.     int            /* bytes_text */
  4166. #endif
  4167. );
  4168.  
  4169. extern void XwcDrawImageString(
  4170. #if NeedFunctionPrototypes
  4171.     Display*        /* display */,
  4172.     Drawable        /* d */,
  4173.     XFontSet        /* font_set */,
  4174.     GC            /* gc */,
  4175.     int            /* x */,
  4176.     int            /* y */,
  4177.     wchar_t*        /* text */,
  4178.     int            /* num_wchars */
  4179. #endif
  4180. );
  4181.  
  4182. extern XIM XOpenIM(
  4183. #if NeedFunctionPrototypes
  4184.     Display*            /* dpy */,
  4185.     struct _XrmHashBucketRec*    /* rdb */,
  4186.     char*            /* res_name */,
  4187.     char*            /* res_class */
  4188. #endif
  4189. );
  4190.  
  4191. extern Status XCloseIM(
  4192. #if NeedFunctionPrototypes
  4193.     XIM /* im */
  4194. #endif
  4195. );
  4196.  
  4197. extern char *XGetIMValues(
  4198. #if NeedVarargsPrototypes
  4199.     XIM /* im */, ...
  4200. #endif
  4201. );
  4202.  
  4203. extern Display *XDisplayOfIM(
  4204. #if NeedFunctionPrototypes
  4205.     XIM /* im */
  4206. #endif
  4207. );
  4208.  
  4209. extern char *XLocaleOfIM(
  4210. #if NeedFunctionPrototypes
  4211.     XIM /* im*/
  4212. #endif
  4213. );
  4214.  
  4215. extern XIC XCreateIC(
  4216. #if NeedVarargsPrototypes
  4217.     XIM /* im */, ...
  4218. #endif
  4219. );
  4220.  
  4221. extern void XDestroyIC(
  4222. #if NeedFunctionPrototypes
  4223.     XIC /* ic */
  4224. #endif
  4225. );
  4226.  
  4227. extern void XSetICFocus(
  4228. #if NeedFunctionPrototypes
  4229.     XIC /* ic */
  4230. #endif
  4231. );
  4232.  
  4233. extern void XUnsetICFocus(
  4234. #if NeedFunctionPrototypes
  4235.     XIC /* ic */
  4236. #endif
  4237. );
  4238.  
  4239. extern wchar_t *XwcResetIC(
  4240. #if NeedFunctionPrototypes
  4241.     XIC /* ic */
  4242. #endif
  4243. );
  4244.  
  4245. extern char *XmbResetIC(
  4246. #if NeedFunctionPrototypes
  4247.     XIC /* ic */
  4248. #endif
  4249. );
  4250.  
  4251. extern char *XSetICValues(
  4252. #if NeedVarargsPrototypes
  4253.     XIC /* ic */, ...
  4254. #endif
  4255. );
  4256.  
  4257. extern char *XGetICValues(
  4258. #if NeedVarargsPrototypes
  4259.     XIC /* ic */, ...
  4260. #endif
  4261. );
  4262.  
  4263. extern XIM XIMOfIC(
  4264. #if NeedFunctionPrototypes
  4265.     XIC /* ic */
  4266. #endif
  4267. );
  4268.  
  4269. extern Bool XFilterEvent(
  4270. #if NeedFunctionPrototypes
  4271.     XEvent*    /* event */,
  4272.     Window    /* window */
  4273. #endif
  4274. );
  4275.  
  4276. extern int XmbLookupString(
  4277. #if NeedFunctionPrototypes
  4278.     XIC            /* ic */,
  4279.     XKeyPressedEvent*    /* event */,
  4280.     char*        /* buffer_return */,
  4281.     int            /* bytes_buffer */,
  4282.     KeySym*        /* keysym_return */,
  4283.     Status*        /* status_return */
  4284. #endif
  4285. );
  4286.  
  4287. extern int XwcLookupString(
  4288. #if NeedFunctionPrototypes
  4289.     XIC            /* ic */,
  4290.     XKeyPressedEvent*    /* event */,
  4291.     wchar_t*        /* buffer_return */,
  4292.     int            /* wchars_buffer */,
  4293.     KeySym*        /* keysym_return */,
  4294.     Status*        /* status_return */
  4295. #endif
  4296. );
  4297.  
  4298. extern XVaNestedList XVaCreateNestedList(
  4299. #if NeedVarargsPrototypes
  4300.     int /*unused*/, ...
  4301. #endif
  4302. );
  4303.  
  4304. _XFUNCPROTOEND
  4305.  
  4306. #ifdef MAC_TCL
  4307. #   undef Cursor
  4308. #   undef Region
  4309. #endif
  4310.  
  4311. #endif /* _XLIB_H_ */
  4312.